mirror of https://github.com/apache/lucene.git
SOLR-4421,SOLR-4165: Fix wait loop to sleep, reduce max wait time, wait min 1 second
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1446926 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e61398084d
commit
d540b8e122
|
@ -564,7 +564,7 @@ public final class ZkController {
|
||||||
|
|
||||||
// now wait till the updates are in our state
|
// now wait till the updates are in our state
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
long timeout = now + 1000 * 300;
|
long timeout = now + 1000 * 30;
|
||||||
boolean foundStates = false;
|
boolean foundStates = false;
|
||||||
while (System.currentTimeMillis() < timeout) {
|
while (System.currentTimeMillis() < timeout) {
|
||||||
clusterState = zkStateReader.getClusterState();
|
clusterState = zkStateReader.getClusterState();
|
||||||
|
@ -586,8 +586,10 @@ public final class ZkController {
|
||||||
|
|
||||||
if (updatedNodes.size() == 0) {
|
if (updatedNodes.size() == 0) {
|
||||||
foundStates = true;
|
foundStates = true;
|
||||||
|
Thread.sleep(1000);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Thread.sleep(1000);
|
||||||
}
|
}
|
||||||
if (!foundStates) {
|
if (!foundStates) {
|
||||||
log.warn("Timed out waiting to see all nodes published as DOWN in our cluster state.");
|
log.warn("Timed out waiting to see all nodes published as DOWN in our cluster state.");
|
||||||
|
|
Loading…
Reference in New Issue