Commit 1dcb885c authored by Vincent Pelletier's avatar Vincent Pelletier

Make setLastOID consistent with setLastTID.

parent 3dc40dc6
......@@ -55,7 +55,6 @@ class RecoveryManager(MasterHandler):
self.app.changeClusterState(ClusterStates.RECOVERING)
em = self.app.em
self.app.tm.setLastOID(None)
self.app.pt.setID(None)
# collect the last partition table available
......@@ -119,7 +118,7 @@ class RecoveryManager(MasterHandler):
def answerLastIDs(self, conn, loid, ltid, lptid):
# Get max values.
if loid is not None:
self.app.tm.setLastOID(max(loid, self.app.tm.getLastOID()))
self.app.tm.setLastOID(loid)
if ltid is not None:
self.app.tm.setLastTID(ltid)
if lptid > self.target_ptid:
......
......@@ -266,7 +266,7 @@ class TransactionManager(object):
return False
def setLastOID(self, oid):
self._last_oid = oid
self._last_oid = max(oid, self._last_oid)
def getLastOID(self):
return self._last_oid
......
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