[Neo-report] r2785 jm - /trunk/neo/master/transactions.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jun 15 12:39:11 CEST 2011


Author: jm
Date: Wed Jun 15 12:39:11 2011
New Revision: 2785

Log:
master: fix bug when a storage is lost in the middle of a transaction

Modified:
    trunk/neo/master/transactions.py

Modified: trunk/neo/master/transactions.py
==============================================================================
--- trunk/neo/master/transactions.py [iso-8859-1] (original)
+++ trunk/neo/master/transactions.py [iso-8859-1] Wed Jun 15 12:39:11 2011
@@ -194,9 +194,11 @@ class Transaction(object):
         # XXX: We might loose information that a storage successfully locked
         # data but was later found to be disconnected. This loss has no impact
         # on current code, but it might be disturbing to reader or future code.
-        self._lock_wait_uuid_set.discard(uuid)
-        self._uuid_set.discard(uuid)
-        return self.locked()
+        if self._prepared:
+            self._lock_wait_uuid_set.discard(uuid)
+            self._uuid_set.discard(uuid)
+            return self.locked()
+        return False
 
     def lock(self, uuid):
         """




More information about the Neo-report mailing list