mirror of
https://github.com/apache/lucene.git
synced 2025-03-09 01:59:27 +00:00
ease timings a bit for large clusters
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1426795 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5065cdebd3
commit
cb8065c947
@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory;
|
||||
public class Overseer {
|
||||
public static final String QUEUE_OPERATION = "operation";
|
||||
|
||||
private static final int STATE_UPDATE_DELAY = 500; // delay between cloud state updates
|
||||
private static final int STATE_UPDATE_DELAY = 1500; // delay between cloud state updates
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(Overseer.class);
|
||||
|
||||
|
@ -652,8 +652,9 @@ public final class ZkController {
|
||||
|
||||
|
||||
// in this case, we want to wait for the leader as long as the leader might
|
||||
// wait for a vote, at least
|
||||
String leaderUrl = getLeader(cloudDesc, Integer.parseInt(leaderVoteWait) + 1000);
|
||||
// wait for a vote, at least - but also long enough that a large cluster has
|
||||
// time to get its act together
|
||||
String leaderUrl = getLeader(cloudDesc, Integer.parseInt(leaderVoteWait) + 600000);
|
||||
|
||||
String ourUrl = ZkCoreNodeProps.getCoreUrl(baseUrl, coreName);
|
||||
log.info("We are " + ourUrl + " and leader is " + leaderUrl);
|
||||
@ -721,7 +722,7 @@ public final class ZkController {
|
||||
|
||||
// now wait until our currently cloud state contains the latest leader
|
||||
String clusterStateLeader = zkStateReader.getLeaderUrl(collection,
|
||||
shardId, 30000);
|
||||
shardId, timeoutms);
|
||||
int tries = 0;
|
||||
while (!leaderUrl.equals(clusterStateLeader)) {
|
||||
if (tries == 60) {
|
||||
@ -733,7 +734,7 @@ public final class ZkController {
|
||||
Thread.sleep(1000);
|
||||
tries++;
|
||||
clusterStateLeader = zkStateReader.getLeaderUrl(collection, shardId,
|
||||
30000);
|
||||
timeoutms);
|
||||
leaderUrl = getLeaderProps(collection, cloudDesc.getShardId(), timeoutms)
|
||||
.getCoreUrl();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user