From 21c796e09642b83020f4cedc7085c32d54797c0d Mon Sep 17 00:00:00 2001 From: Adam Holmberg Date: Thu, 7 Jul 2016 15:38:17 -0500 Subject: [PATCH] Remove nonexistent contact points from metadata after discovery PYTHON-549 --- cassandra/cluster.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cassandra/cluster.py b/cassandra/cluster.py index afb9188127..e149dff5a5 100644 --- a/cassandra/cluster.py +++ b/cassandra/cluster.py @@ -2783,9 +2783,8 @@ def _refresh_node_list_and_token_map(self, connection, preloaded_results=None, for old_host in self._cluster.metadata.all_hosts(): if old_host.address != connection.host and old_host.address not in found_hosts: should_rebuild_token_map = True - if old_host.address not in self._cluster.contact_points: - log.debug("[control connection] Removing host not found in peers metadata: %r", old_host) - self._cluster.remove_host(old_host) + log.debug("[control connection] Removing host not found in peers metadata: %r", old_host) + self._cluster.remove_host(old_host) log.debug("[control connection] Finished fetching ring info") if partitioner and should_rebuild_token_map: