diff --git a/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java b/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java index 25136e3b68f..4f4a808835e 100644 --- a/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java +++ b/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java @@ -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... } 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 edafb2ba30d..b78766f16cf 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 @@ -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); + } } } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java index ec05e54f7e2..0b6169a7c7a 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java @@ -971,6 +971,46 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes } + public void showCounts() { + Set theShards = shardToJetty.keySet(); + + for (String shard : theShards) { + List 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();