mirror of https://github.com/apache/lucene.git
SOLR-3180: wait for leader to see our recovering state before peer sync as well
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1425342 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3340abc8dd
commit
c8f34f9f78
|
@ -341,6 +341,18 @@ public class RecoveryStrategy extends Thread implements ClosableThread {
|
||||||
}
|
}
|
||||||
|
|
||||||
zkController.publish(core.getCoreDescriptor(), ZkStateReader.RECOVERING);
|
zkController.publish(core.getCoreDescriptor(), ZkStateReader.RECOVERING);
|
||||||
|
|
||||||
|
|
||||||
|
sendPrepRecoveryCmd(leaderBaseUrl, leaderCoreName);
|
||||||
|
|
||||||
|
// we wait a bit so that any updates on the leader
|
||||||
|
// that started before they saw recovering state
|
||||||
|
// are sure to have finished
|
||||||
|
try {
|
||||||
|
Thread.sleep(2000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
}
|
||||||
|
|
||||||
// first thing we just try to sync
|
// first thing we just try to sync
|
||||||
if (firstTime) {
|
if (firstTime) {
|
||||||
|
@ -388,17 +400,6 @@ public class RecoveryStrategy extends Thread implements ClosableThread {
|
||||||
|
|
||||||
log.info("Starting Replication Recovery. core=" + coreName);
|
log.info("Starting Replication Recovery. core=" + coreName);
|
||||||
|
|
||||||
sendPrepRecoveryCmd(leaderBaseUrl, leaderCoreName);
|
|
||||||
|
|
||||||
// we wait a bit so that any updates on the leader
|
|
||||||
// that started before they saw recovering state
|
|
||||||
// are sure to have finished
|
|
||||||
try {
|
|
||||||
Thread.sleep(2000);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
Thread.currentThread().interrupt();
|
|
||||||
}
|
|
||||||
|
|
||||||
log.info("Begin buffering updates. core=" + coreName);
|
log.info("Begin buffering updates. core=" + coreName);
|
||||||
ulog.bufferUpdates();
|
ulog.bufferUpdates();
|
||||||
replayed = false;
|
replayed = false;
|
||||||
|
|
Loading…
Reference in New Issue