Commit 48c9104a authored by Grégory Wisniewski's avatar Grégory Wisniewski

Disable processing of answerLastIDs in verification state.

This packet handler should be dropped but it's break some functional tests,
may be due to a race condition when switching from recovery to verification.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1982 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent c51d17dc
...@@ -183,13 +183,10 @@ class VerificationManager(BaseServiceHandler): ...@@ -183,13 +183,10 @@ class VerificationManager(BaseServiceHandler):
return uuid_set return uuid_set
def answerLastIDs(self, conn, loid, ltid, lptid): def answerLastIDs(self, conn, loid, ltid, lptid):
app = self.app # FIXME: this packet should not allowed here, the master already
# If I get a bigger value here, it is dangerous. # accepted the current partition table end IDs. As there were manually
if (loid is not None and app.loid < loid) or \ # approved during recovery, there is no need to check them here.
(ltid is not None and app.tm.getLastTID() < ltid) or \ pass
(lptid is not None and app.pt.getID() < lptid):
logging.critical('got later information in verification')
raise VerificationFailure
def answerUnfinishedTransactions(self, conn, tid_list): def answerUnfinishedTransactions(self, conn, tid_list):
uuid = conn.getUUID() uuid = conn.getUUID()
......
...@@ -94,7 +94,8 @@ class MasterVerificationTests(NeoTestBase): ...@@ -94,7 +94,8 @@ class MasterVerificationTests(NeoTestBase):
self.assertEqual(self.app.nm.getByAddress(conn.getAddress()).getState(), self.assertEqual(self.app.nm.getByAddress(conn.getAddress()).getState(),
NodeStates.TEMPORARILY_DOWN) NodeStates.TEMPORARILY_DOWN)
def test_09_answerLastIDs(self): def _test_09_answerLastIDs(self):
# XXX: test disabled, should be an unexpected packet
verification = self.verification verification = self.verification
uuid = self.identifyToMasterNode() uuid = self.identifyToMasterNode()
loid = self.app.loid loid = self.app.loid
......
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