[ZODB-Dev] ZODB3 diffs for ZODB4-like rollbacks

Edward Moy emoy at apple.com
Mon Apr 26 16:29:15 EDT 2004


Here are the diffs I used to get ZODB4-like rollbacks, on top of 
top-of-tree ZODB (as of last week).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: zodb-rollback.diff
Type: application/octet-stream
Size: 10721 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20040426/3f9bd068/zodb-rollback-0001.obj
-------------- next part --------------


It includes a copy of the test-txn.py unit test from ZODB4, modified  
for ZODB3, and tests both ZODB3 sub-transactions and ZODB4-like  
rollbacks.

Being new to ZODB, I wanted to make the minimal amount of changes, and  
so I changed tpc_finish() in TmpStore to return an undo object to the  
higher layers.  I know it may be a little unclean, but it was expedient  
to change the Connection's tpc_finish() to return a tuple containing  
the connection itself, along with the undo object, so that the Rollback  
object can verify that the current transaction is the same as when it  
was created.

I'm willing to modify my changes to better fit into to ZODB policy, as  
long as someone explains them to me.
------------------------------------------------------------------------ 
--
Edward Moy
Apple Computer, Inc.
emoy at apple.com


More information about the ZODB-Dev mailing list