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
This commit is contained in:
Mark Robert Miller 2013-03-26 06:01:44 +00:00
parent 509e84dede
commit 2b6e3dd7ad
1 changed files with 3 additions and 1 deletions

View File

@ -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<Node>(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<String> skipListSet = null;
if (skipList != null) {
skipListSet = new HashSet<String>(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;
}