Commit 61679572 authored by Vincent Pelletier's avatar Vincent Pelletier

Call setLastTID when begining with a client-provided TID.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2566 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent cca3e46c
...@@ -333,7 +333,10 @@ class TransactionManager(object): ...@@ -333,7 +333,10 @@ class TransactionManager(object):
# No TID requested, generate a temporary one # No TID requested, generate a temporary one
tid = self.getTTID() tid = self.getTTID()
else: else:
# Use of specific TID requested, queue it immediately and update
# last TID.
self._queue.append((uuid, tid)) self._queue.append((uuid, tid))
self.setLastTID(tid)
return tid return tid
def prepare(self, node, ttid, divisor, oid_list, uuid_list, msg_id): def prepare(self, node, ttid, divisor, oid_list, uuid_list, msg_id):
...@@ -347,7 +350,6 @@ class TransactionManager(object): ...@@ -347,7 +350,6 @@ class TransactionManager(object):
else: else:
tid = self._nextTID(ttid, divisor) tid = self._nextTID(ttid, divisor)
self._queue.append((node.getUUID(), tid)) self._queue.append((node.getUUID(), tid))
self.setLastTID(tid)
neo.logging.debug('Finish TXN %s for %s (was %s)', dump(tid), node, dump(ttid)) neo.logging.debug('Finish TXN %s for %s (was %s)', dump(tid), node, dump(ttid))
txn = Transaction(node, ttid, tid, oid_list, uuid_list, msg_id) txn = Transaction(node, ttid, tid, oid_list, uuid_list, msg_id)
self._tid_dict[tid] = txn self._tid_dict[tid] = txn
......
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