From 2b6e3dd7ad065b80cbeb31a67099303d02c14f6b Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Tue, 26 Mar 2013 06:01:44 +0000 Subject: [PATCH] SOLR-4644: try passing test.distrib.skip.servers on - if we hit a replica, we want it passed to the leader git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1460980 13f79535-47bb-0310-9956-ffa450edef68 --- .../solr/update/processor/DistributedUpdateProcessor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java index dd13f2cd050..b2d1ecdc1d5 100644 --- a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java +++ b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java @@ -77,6 +77,7 @@ import static org.apache.solr.update.processor.DistributingUpdateProcessorFactor // NOT mt-safe... create a new processor for each add thread // TODO: we really should not wait for distrib after local? unless a certain replication factor is asked for public class DistributedUpdateProcessor extends UpdateRequestProcessor { + private static final String TEST_DISTRIB_SKIP_SERVERS = "test.distrib.skip.servers"; public final static Logger log = LoggerFactory.getLogger(DistributedUpdateProcessor.class); /** @@ -241,7 +242,7 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { if (replicaProps != null) { nodes = new ArrayList(replicaProps.size()); // check for test param that lets us miss replicas - String[] skipList = req.getParams().getParams("test.distrib.skip.servers"); + String[] skipList = req.getParams().getParams(TEST_DISTRIB_SKIP_SERVERS); Set skipListSet = null; if (skipList != null) { skipListSet = new HashSet(skipList.length); @@ -756,6 +757,7 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { private ModifiableSolrParams filterParams(SolrParams params) { ModifiableSolrParams fparams = new ModifiableSolrParams(); passParam(params, fparams, UpdateParams.UPDATE_CHAIN); + passParam(params, fparams, TEST_DISTRIB_SKIP_SERVERS); return fparams; }