mirror of https://github.com/apache/lucene.git
SOLR-4967: Supporting passing on multi value params when forwarding allowed params in DistributedUpdateProcessor
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1497812 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b9729cd055
commit
6235e48896
|
@ -146,7 +146,7 @@ public class SyncStrategy {
|
|||
syncToMe(zkController, collection, shardId, leaderProps, core.getCoreDescriptor());
|
||||
|
||||
} else {
|
||||
log.info("Leader's attempt to sync with shard failed, moving to the next canidate");
|
||||
log.info("Leader's attempt to sync with shard failed, moving to the next candidate");
|
||||
// lets see who seems ahead...
|
||||
}
|
||||
|
||||
|
|
|
@ -844,9 +844,11 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
|
|||
}
|
||||
|
||||
private void passParam(SolrParams params, ModifiableSolrParams fparams, String param) {
|
||||
String value = params.get(param);
|
||||
if (value != null) {
|
||||
fparams.add(param, value);
|
||||
String[] values = params.getParams(param);
|
||||
if (values != null) {
|
||||
for (String value : values) {
|
||||
fparams.add(param, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -971,6 +971,46 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
|
|||
|
||||
}
|
||||
|
||||
public void showCounts() {
|
||||
Set<String> theShards = shardToJetty.keySet();
|
||||
|
||||
for (String shard : theShards) {
|
||||
List<CloudJettyRunner> solrJetties = shardToJetty.get(shard);
|
||||
|
||||
for (CloudJettyRunner cjetty : solrJetties) {
|
||||
ZkNodeProps props = cjetty.info;
|
||||
System.err.println("PROPS:" + props);
|
||||
|
||||
try {
|
||||
SolrParams query = params("q", "*:*", "rows", "0", "distrib",
|
||||
"false", "tests", "checkShardConsistency"); // "tests" is just a
|
||||
// tag that won't do
|
||||
// anything except be
|
||||
// echoed in logs
|
||||
long num = cjetty.client.solrClient.query(query).getResults()
|
||||
.getNumFound();
|
||||
System.err.println("DOCS:" + num);
|
||||
} catch (SolrServerException e) {
|
||||
System.err.println("error contacting client: " + e.getMessage()
|
||||
+ "\n");
|
||||
continue;
|
||||
} catch (SolrException e) {
|
||||
System.err.println("error contacting client: " + e.getMessage()
|
||||
+ "\n");
|
||||
continue;
|
||||
}
|
||||
boolean live = false;
|
||||
String nodeName = props.getStr(ZkStateReader.NODE_NAME_PROP);
|
||||
ZkStateReader zkStateReader = cloudClient.getZkStateReader();
|
||||
if (zkStateReader.getClusterState().liveNodesContain(nodeName)) {
|
||||
live = true;
|
||||
}
|
||||
System.err.println(" live:" + live);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String toStr(SolrDocumentList lst, int maxSz) {
|
||||
if (lst.size() <= maxSz) return lst.toString();
|
||||
|
||||
|
|
Loading…
Reference in New Issue