[Z3-sqlos] RFC: Transaction simplification branch
Brian Sutherland
jinty at web.de
Fri Dec 9 00:07:00 CET 2005
Hi,
I just cut a new branch with some major simplifications to the
transaction machinery of sqlos. But these are _big_, so I would like to
ask for testing/comments before I go further.
Perhaps I went too far? Or cut something necessary?
The branch is at:
http://codespeak.net/svn/z3/sqlos/branch/jinty-simplify-transactions
The main changes are:
* Call sync as a pre-commit hook.
(kudos to Jim, http://www.zope.org/Collectors/Zope3-dev/511)
* don't syncUpdate anymore on commit or sync on prepare
(It was already done in the pre-commit)
* Don't force the zope.app.rdb data manager to join the transaction.
(Thanks to the pre-commit hook this is not necessary)
* Rip out the testing support code in the transaction module and re-write
the unit test in a weaker but less brittle way. We test results now,
not process.
* Make self.objects self._objects.
* Rip out sanity checking code checking that the transaction manager
always dealt with the same transaction.
* The Transaction Manager doesn't take the sqlconnection as an argument
anymore as that has become un-necessary with the other changes.
* Get rid of the events module.
- The modified subscriber disappeared as we don't call it anymore.
- The expired event was hardwired into _transaction.py
Rationale: When you are committing/aborting a transaction you don't
really want to be firing events. This makes it very easy for people
to hook in exception raising code which can make a serious mess of
things...
Also it was just too many layers of confusion for what was needed.
--
Brian Sutherland
Metropolis - "it's the first movie with a robot. And she's a woman.
And she's EVIL!!"
More information about the z3-sqlos
mailing list