Commit 017f248d authored by Julien Muchembled's avatar Julien Muchembled

Make NodeManager.remove stricter

parent a60e36e8
......@@ -280,9 +280,6 @@ class NodeManager(EventQueue):
self._master_db.add(node.getAddress())
def remove(self, node):
if node not in self._node_set:
logging.warning('removing unknown node %r, ignoring', node)
return
self._node_set.remove(node)
# a node may have not be indexed by uuid or address, eg.:
# - a client or admin node that don't have listening address
......
......@@ -43,6 +43,7 @@ class AdministrationHandler(MasterHandler):
def connectionLost(self, conn, new_state):
node = self.app.nm.getByUUID(conn.getUUID())
if node is not None:
self.app.nm.remove(node)
def setClusterState(self, conn, state):
......
......@@ -30,7 +30,6 @@ class ClientServiceHandler(MasterHandler):
app.tm.clientLost(node)
node.setUnknown()
app.broadcastNodesInformation([node])
app.nm.remove(node)
def askBeginTransaction(self, conn, tid):
"""
......
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