From aec783468c68caacc56b1b5b01c95e22be14eab0 Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Fri, 10 May 2013 19:01:20 +0000 Subject: [PATCH] SOLR-4806: Shard splitting does not abort if WaitForState times out git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1481145 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 2 + .../cloud/OverseerCollectionProcessor.java | 56 +++++++++---------- 2 files changed, 27 insertions(+), 31 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 7abf797e58b..c96f13b1d51 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -162,6 +162,8 @@ Bug Fixes * SOLR-4791: solr.xml sharedLib does not work in 4.3.0 (Ryan Ernst, Jan Høydahl via Erick Erickson) +* SOLR-4806: Shard splitting does not abort if WaitForState times out (shalin) + Other Changes ---------------------- diff --git a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java index 91daa739010..5b83f63f1fb 100644 --- a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java +++ b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java @@ -372,13 +372,10 @@ public class OverseerCollectionProcessor implements Runnable, ClosableThread { } } - ShardResponse srsp; - do { - srsp = shardHandler.takeCompletedOrError(); - if (srsp != null) { - processResponse(results, srsp); - } - } while (srsp != null); + // do not abort splitshard if the unloading fails + // this can happen because the replicas created previously may be down + // the only side effect of this is that the sub shard may end up having more replicas than we want + collectShardResponses(results, false, null); for (int i=0; i