SOLR-4997: Skip log recovery for sub shard leaders only

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1503328 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2013-07-15 16:47:48 +00:00
parent c7e9dbdde3
commit 69049b99fa
1 changed files with 1 additions and 1 deletions

View File

@ -794,7 +794,7 @@ public final class ZkController {
if (!core.isReloaded() && ulog != null) { if (!core.isReloaded() && ulog != null) {
// disable recovery in case shard is in construction state (for shard splits) // disable recovery in case shard is in construction state (for shard splits)
Slice slice = getClusterState().getSlice(collection, shardId); Slice slice = getClusterState().getSlice(collection, shardId);
if (!Slice.CONSTRUCTION.equals(slice.getState()) && !isLeader) { if (!Slice.CONSTRUCTION.equals(slice.getState()) || !isLeader) {
Future<UpdateLog.RecoveryInfo> recoveryFuture = core.getUpdateHandler() Future<UpdateLog.RecoveryInfo> recoveryFuture = core.getUpdateHandler()
.getUpdateLog().recoverFromLog(); .getUpdateLog().recoverFromLog();
if (recoveryFuture != null) { if (recoveryFuture != null) {