[Neo-report] r2184 gregory - /trunk/neo/master/handlers/storage.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jun 21 17:54:59 CEST 2010


Author: gregory
Date: Mon Jun 21 17:54:58 2010
New Revision: 2184

Log:
When a storage is lost, Trigger finish only for prepared transactions.

Modified:
    trunk/neo/master/handlers/storage.py

Modified: trunk/neo/master/handlers/storage.py
==============================================================================
--- trunk/neo/master/handlers/storage.py [iso-8859-1] (original)
+++ trunk/neo/master/handlers/storage.py [iso-8859-1] Mon Jun 21 17:54:58 2010
@@ -43,7 +43,11 @@ class StorageServiceHandler(BaseServiceH
         self.app.outdateAndBroadcastPartition()
         uuid = conn.getUUID()
         for tid, transaction in self.app.tm.items():
-            if transaction.forget(uuid):
+            # If this transaction was not "prepared" (see askFinishTransaction)
+            # there is nothing to cleanup on it (it doesn't have the list of
+            # involved storage nodes yet). As such transaction would be detected
+            # as locked, we must also prevent _afterLock from being called.
+            if transaction.isPrepared() and transaction.forget(uuid):
                 self._afterLock(tid)
 
     def askLastIDs(self, conn):





More information about the Neo-report mailing list