Commit 809fce71 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Master's now handle connection failures during recovery.

This behaviour was probably lost with the master's handler split and was found by fixing unit tests.
During recovery, if a node is lost it's state is updated but not propagated to other (storages) nodes because after the recovery they will all retreive the whole node list.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1475 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 39544c84
......@@ -24,6 +24,13 @@ from neo.util import dump
class RecoveryHandler(MasterHandler):
"""This class deals with events for a recovery phase."""
def connectionLost(self, conn, new_state):
node = self.app.nm.getByUUID(conn.getUUID())
assert node is not None
if node.getState() == new_state:
return
node.setState(new_state)
def connectionCompleted(self, conn):
# ask the last IDs to perform the recovery
conn.ask(Packets.AskLastIDs())
......
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