mirror of https://github.com/apache/lucene.git
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:
parent
509e84dede
commit
2b6e3dd7ad
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue