Commit dc6b7cee authored by Grégory Wisniewski's avatar Grégory Wisniewski

Clean node index of master's transaction manager.

A connection lost no more abort current transactions and clean the node
index (by calling abortFor). Do this job each time a transaction aborted
to avoid empty entries and memory leaks.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2170 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 014ffd8a
......@@ -265,9 +265,14 @@ class TransactionManager(object):
'the lock on oid %s, but it was held by %s' % (dump(tid),
dump(oid), dump(lock_tid))
del self._store_lock_dict[oid]
# _uuid_dict entry will be deleted at node disconnection
self._uuid_dict[transaction.getUUID()].discard(transaction)
# remove the transaction
uuid = transaction.getUUID()
self._uuid_dict[uuid].discard(transaction)
# clean node index if there is no more current transactions
if not self._uuid_dict[uuid]:
del self._uuid_dict[uuid]
del self._transaction_dict[tid]
# some locks were released, some pending locks may now succeed
self._app.executeQueuedEvents()
def abortFor(self, uuid):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment