Don't sleep following a timeout in schema wait.

This commit is contained in:
Adam Holmberg
2014-12-01 16:24:34 +00:00
parent f32831fdf0
commit 1d924f1e44

View File

@@ -2162,7 +2162,6 @@ class ControlConnection(object):
log.debug("[control connection] Waiting for schema agreement") log.debug("[control connection] Waiting for schema agreement")
start = self._time.time() start = self._time.time()
elapsed = 0 elapsed = 0
poll_interval = 0.2
cl = ConsistencyLevel.ONE cl = ConsistencyLevel.ONE
total_timeout = self._cluster.max_schema_agreement_wait total_timeout = self._cluster.max_schema_agreement_wait
schema_mismatches = None schema_mismatches = None
@@ -2176,7 +2175,6 @@ class ControlConnection(object):
except OperationTimedOut as timeout: except OperationTimedOut as timeout:
log.debug("[control connection] Timed out waiting for " log.debug("[control connection] Timed out waiting for "
"response during schema agreement check: %s", timeout) "response during schema agreement check: %s", timeout)
self._time.sleep(poll_interval)
elapsed = self._time.time() - start elapsed = self._time.time() - start
continue continue
except ConnectionShutdown: except ConnectionShutdown:
@@ -2191,7 +2189,7 @@ class ControlConnection(object):
return True return True
log.debug("[control connection] Schemas mismatched, trying again") log.debug("[control connection] Schemas mismatched, trying again")
self._time.sleep(poll_interval) self._time.sleep(0.2)
elapsed = self._time.time() - start elapsed = self._time.time() - start
log.warn("Node %s is reporting a schema disagreement: %s", log.warn("Node %s is reporting a schema disagreement: %s",