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

Make NodeManager.remove stricter

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