[Zodb-checkins] CVS: ZODB3/ZODB - Transaction.py:1.56.2.2

Jim Fulton jim at zope.com
Thu Jan 22 16:25:28 EST 2004


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv15783

Modified Files:
      Tag: zope3-zodb3-devel-branch
	Transaction.py 
Log Message:
Fixed a bug in commit sub. It needs to "begin" a two-phase commit of
the top-level txn.


=== ZODB3/ZODB/Transaction.py 1.56.2.1 => 1.56.2.2 ===
--- ZODB3/ZODB/Transaction.py:1.56.2.1	Thu Jan 22 15:16:42 2004
+++ ZODB3/ZODB/Transaction.py	Thu Jan 22 16:25:28 2004
@@ -470,6 +470,7 @@
 
     Adapt transaction.interfaces.IDataManager to
     ZODB.interfaces.IPureDatamanager
+
     """
 
     # Note that it is pretty important that this does not have a _p_jar
@@ -500,7 +501,9 @@
         self._datamanager.abort(transaction)
 
     def commit_sub(self, transaction):
-        pass # Nothing to do
+        # Nothing to do wrt data, be we begin 2pc for the top-level
+        # trans
+        self._sub = False
         
     def tpc_begin(self, transaction, subtransaction):
         self._sub = subtransaction
@@ -512,8 +515,8 @@
             self._datamanager.abort(transaction)
 
     def tpc_finish(self, transaction):
-        if self.sub:
-            self._rollback = self._datamanager.savepoint().rollback
+        if self._sub:
+            self._rollback = self._datamanager.savepoint(transaction).rollback
         else:
             self._datamanager.commit(transaction)
 




More information about the Zodb-checkins mailing list