[Neo-report] r2605 gregory - /trunk/neo/storage/transactions.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jan 10 18:02:19 CET 2011


Author: gregory
Date: Mon Jan 10 18:02:19 2011
New Revision: 2605

Log:
All locks might not have been acquired when aborting.

Modified:
    trunk/neo/storage/transactions.py

Modified: trunk/neo/storage/transactions.py
==============================================================================
--- trunk/neo/storage/transactions.py [iso-8859-1] (original)
+++ trunk/neo/storage/transactions.py [iso-8859-1] Mon Jan 10 18:02:19 2011
@@ -320,7 +320,12 @@ class TransactionManager(object):
                 assert lock_tid in (tid, None), 'Transaction %s tried to ' \
                     'release the lock on oid %s, but it was held by %s' % (
                     dump(tid), dump(oid), dump(lock_tid))
-            del self._store_lock_dict[oid]
+            try:
+                del self._store_lock_dict[oid]
+            except KeyError:
+                # all locks might not have been acquiredwhen aborting
+                neo.logging.warning('%s write lock was not held by %s',
+                    dump(oid), dump(tid))
         # remove the transaction
         uuid = transaction.getUUID()
         self._uuid_dict[uuid].discard(transaction)




More information about the Neo-report mailing list