[Neo-report] r2599 vincent - /trunk/neo/storage/transactions.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jan 10 11:46:47 CET 2011
Author: vincent
Date: Mon Jan 10 11:46:47 2011
New Revision: 2599
Log:
Maintain consistency between lock possession and object data presence.
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 11:46:47 2011
@@ -104,6 +104,9 @@ class Transaction(object):
self._object_dict[oid] = (oid, compression, checksum, data,
value_serial)
+ def delObject(self, oid):
+ del self._object_dict[oid]
+
def getObject(self, oid):
return self._object_dict.get(oid)
@@ -228,8 +231,10 @@ class TransactionManager(object):
neo.logging.info('Deadlock resolution on %r:%r', dump(oid),
dump(tid))
# A duplicate store means client is resolving a deadlock, so
- # drop the lock it held on this object.
+ # drop the lock it held on this object, and drop object data for
+ # consistency.
del self._store_lock_dict[oid]
+ self._transaction_dict[tid].delObject(oid)
# Give a chance to pending events to take that lock now.
self._app.executeQueuedEvents()
# Attemp to acquire lock again.
More information about the Neo-report
mailing list