You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2020/07/01 15:29:54 UTC
[lucene-solr] 10/11: SOLR-12847: More cleanups.
This is an automated email from the ASF dual-hosted git repository.
ab pushed a commit to branch jira/solr-12847-2
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit 8c1d076fd87461d004506a09cc6ba669caaaeec2
Author: Andrzej Bialecki <ab...@apache.org>
AuthorDate: Wed Jul 1 17:19:47 2020 +0200
SOLR-12847: More cleanups.
---
.../apache/solr/cloud/api/collections/Assign.java | 4 ++--
.../solr/cloud/api/collections/SplitShardCmd.java | 2 --
.../src/java/org/apache/solr/util/SolrCLI.java | 16 ++-------------
.../test-files/solr/simSnapshot/clusterState.json | 18 +----------------
.../test-files/solr/simSnapshot/statistics.json | 2 +-
.../solr/cloud/MultiSolrCloudTestCaseTest.java | 1 -
.../OverseerCollectionConfigSetProcessorTest.java | 1 -
.../org/apache/solr/cloud/TestPullReplica.java | 8 +++-----
.../AbstractCloudBackupRestoreTestCase.java | 15 --------------
.../api/collections/CustomCollectionTest.java | 1 -
.../TestRequestStatusCollectionAPI.java | 3 ---
.../cloud/autoscaling/sim/TestSimScenario.java | 8 ++++----
.../conf/solrconfig.xml | 2 +-
.../resources/apispec/collections.Commands.json | 4 ----
.../solr/autoscaling/testAddMissingReplica.json | 1 -
...testAutoscalingPreferencesUsedWithNoPolicy.json | 1 -
.../solr/autoscaling/testEmptyCollection.json | 3 +--
.../solrj/solr/autoscaling/testInfiniteLoop.json | 23 ----------------------
.../testMoveReplicasInMultipleCollections.json | 4 +---
.../solr/autoscaling/testUnresolvedSuggestion.json | 3 +--
.../solrj/impl/CloudSolrClientCacheTest.java | 1 -
21 files changed, 17 insertions(+), 104 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/Assign.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/Assign.java
index 383b250..1d2d1dc 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/Assign.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/Assign.java
@@ -322,8 +322,8 @@ public class Assign {
// Only called from addReplica (and by extension createShard) (so far).
//
- // Gets a list of candidate nodes to put the required replica(s) on. Throws errors if not enough replicas
- // could be created on live nodes given maxShardsPerNode, Replication factor (if from createShard) etc.
+ // Gets a list of candidate nodes to put the required replica(s) on. Throws errors if the AssignStrategy
+ // can't allocate valid positions.
@SuppressWarnings({"unchecked"})
public static List<ReplicaPosition> getNodesForNewReplicas(ClusterState clusterState, String collectionName,
String shard, int nrtReplicas, int tlogReplicas, int pullReplicas,
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
index 2d04947..368d64c 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/SplitShardCmd.java
@@ -434,8 +434,6 @@ public class SplitShardCmd implements OverseerCollectionMessageHandler.Cmd {
List<String> nodeList = new ArrayList<>(nodes.size());
nodeList.addAll(nodes);
- // TODO: Have maxShardsPerNode param for this operation?
-
// Remove the node that hosts the parent shard for replica creation.
nodeList.remove(nodeName);
diff --git a/solr/core/src/java/org/apache/solr/util/SolrCLI.java b/solr/core/src/java/org/apache/solr/util/SolrCLI.java
index 7260ec1..9e188f9 100755
--- a/solr/core/src/java/org/apache/solr/util/SolrCLI.java
+++ b/solr/core/src/java/org/apache/solr/util/SolrCLI.java
@@ -1727,12 +1727,6 @@ public class SolrCLI implements CLIO {
.required(false)
.desc("Number of copies of each document across the collection (replicas per shard); default is 1")
.build(),
- Option.builder("maxShardsPerNode")
- .argName("#")
- .hasArg()
- .required(false)
- .desc("Maximum number of shards per Solr node; default is determined based on the number of shards, replication factor, and live nodes.")
- .build(),
Option.builder("confdir")
.argName("NAME")
.hasArg()
@@ -1923,11 +1917,6 @@ public class SolrCLI implements CLIO {
// build a URL to create the collection
int numShards = optionAsInt(cli, "shards", 1);
int replicationFactor = optionAsInt(cli, "replicationFactor", 1);
- int maxShardsPerNode = -1;
-
- if (cli.hasOption("maxShardsPerNode")) {
- maxShardsPerNode = Integer.parseInt(cli.getOptionValue("maxShardsPerNode"));
- }
String confname = cli.getOptionValue("confname");
String confdir = cli.getOptionValue("confdir");
@@ -1963,12 +1952,11 @@ public class SolrCLI implements CLIO {
// doesn't seem to exist ... try to create
String createCollectionUrl =
String.format(Locale.ROOT,
- "%s/admin/collections?action=CREATE&name=%s&numShards=%d&replicationFactor=%d&maxShardsPerNode=%d",
+ "%s/admin/collections?action=CREATE&name=%s&numShards=%d&replicationFactor=%d",
baseUrl,
collectionName,
numShards,
- replicationFactor,
- maxShardsPerNode);
+ replicationFactor);
if (confname != null && !"".equals(confname.trim())) {
createCollectionUrl = createCollectionUrl + String.format(Locale.ROOT, "&collection.configName=%s", confname);
}
diff --git a/solr/core/src/test-files/solr/simSnapshot/clusterState.json b/solr/core/src/test-files/solr/simSnapshot/clusterState.json
index 004d202..acaa340 100644
--- a/solr/core/src/test-files/solr/simSnapshot/clusterState.json
+++ b/solr/core/src/test-files/solr/simSnapshot/clusterState.json
@@ -80,7 +80,6 @@
"type":"NRT",
"force_set_state":"false"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -114,7 +113,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -148,7 +146,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -182,7 +179,6 @@
"type":"NRT",
"force_set_state":"false"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -216,7 +212,6 @@
"type":"NRT",
"force_set_state":"false"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -549,7 +544,6 @@
"force_set_state":"false"}},
"stateTimestamp":"1562040233681548279"}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -584,7 +578,6 @@
"type":"NRT",
"force_set_state":"false"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -2538,7 +2531,6 @@
"force_set_state":"false"}},
"stateTimestamp":"1565369006475856752"}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"2",
"tlogReplicas":"0"},
@@ -2572,7 +2564,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -2606,7 +2597,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -2640,7 +2630,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -2659,7 +2648,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"1",
"tlogReplicas":"0"},
@@ -2693,7 +2681,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -2727,7 +2714,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -2814,7 +2800,6 @@
"type":"NRT",
"force_set_state":"false"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
"tlogReplicas":"0"},
@@ -2848,7 +2833,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"true",
"nrtReplicas":"3",
- "tlogReplicas":"0"}}}
\ No newline at end of file
+ "tlogReplicas":"0"}}}
diff --git a/solr/core/src/test-files/solr/simSnapshot/statistics.json b/solr/core/src/test-files/solr/simSnapshot/statistics.json
index 735c36e..e806612 100644
--- a/solr/core/src/test-files/solr/simSnapshot/statistics.json
+++ b/solr/core/src/test-files/solr/simSnapshot/statistics.json
@@ -2042,4 +2042,4 @@
"minCoresPerNode":1,
"avgShardSize":22.679232054390013,
"maxShardSize":22.679232054390013,
- "minShardSize":22.679232054390013}}}
\ No newline at end of file
+ "minShardSize":22.679232054390013}}}
diff --git a/solr/core/src/test/org/apache/solr/cloud/MultiSolrCloudTestCaseTest.java b/solr/core/src/test/org/apache/solr/cloud/MultiSolrCloudTestCaseTest.java
index 21cf5631..e4b7551 100644
--- a/solr/core/src/test/org/apache/solr/cloud/MultiSolrCloudTestCaseTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/MultiSolrCloudTestCaseTest.java
@@ -27,7 +27,6 @@ public class MultiSolrCloudTestCaseTest extends MultiSolrCloudTestCase {
private static int numShards;
private static int numReplicas;
- private static int maxShardsPerNode;
private static int nodesPerCluster;
@BeforeClass
diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java
index 9e49fdf..d618653 100644
--- a/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerCollectionConfigSetProcessorTest.java
@@ -782,7 +782,6 @@ public class OverseerCollectionConfigSetProcessorTest extends SolrTestCaseJ4 {
CreateNodeListOptions createNodeListOptions = CreateNodeListOptions.DONT_SEND;
Integer replicationFactor = 2;
Integer numberOfSlices = 4;
- Integer maxShardsPerNode = 2;
testTemplate(numberOfNodes, numberOfNodesToCreateOn, createNodeListOptions, replicationFactor, numberOfSlices,
true);
}
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java b/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
index 955c4b5..5e06c28 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
@@ -134,12 +134,11 @@ public class TestPullReplica extends SolrCloudTestCase {
break;
case 1:
// Sometimes use v1 API
- String url = String.format(Locale.ROOT, "%s/admin/collections?action=CREATE&name=%s&collection.configName=%s&numShards=%s&pullReplicas=%s&maxShardsPerNode=%s",
+ String url = String.format(Locale.ROOT, "%s/admin/collections?action=CREATE&name=%s&collection.configName=%s&numShards=%s&pullReplicas=%s",
cluster.getRandomJetty(random()).getBaseUrl(),
collectionName, "conf",
2, // numShards
- 3, // pullReplicas
- 100); // maxShardsPerNode
+ 3); // pullReplicas
url = url + pickRandom("", "&nrtReplicas=1", "&replicationFactor=1"); // These options should all mean the same
HttpGet createCollectionGet = new HttpGet(url);
cluster.getSolrClient().getHttpClient().execute(createCollectionGet);
@@ -147,11 +146,10 @@ public class TestPullReplica extends SolrCloudTestCase {
case 2:
// Sometimes use V2 API
url = cluster.getRandomJetty(random()).getBaseUrl().toString() + "/____v2/c";
- String requestBody = String.format(Locale.ROOT, "{create:{name:%s, config:%s, numShards:%s, pullReplicas:%s, maxShardsPerNode:%s %s}}",
+ String requestBody = String.format(Locale.ROOT, "{create:{name:%s, config:%s, numShards:%s, pullReplicas:%s, %s}}",
collectionName, "conf",
2, // numShards
3, // pullReplicas
- 100, // maxShardsPerNode
pickRandom("", ", nrtReplicas:1", ", replicationFactor:1")); // These options should all mean the same
HttpPost createCollectionPost = new HttpPost(url);
createCollectionPost.setHeader("Content-type", "application/json");
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/AbstractCloudBackupRestoreTestCase.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/AbstractCloudBackupRestoreTestCase.java
index a7da88f..09d86ab 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/AbstractCloudBackupRestoreTestCase.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/AbstractCloudBackupRestoreTestCase.java
@@ -189,10 +189,6 @@ public abstract class AbstractCloudBackupRestoreTestCase extends SolrCloudTestCa
{
CollectionAdminRequest.Restore restore = CollectionAdminRequest.restoreCollection(restoreCollectionName, backupName)
.setLocation(backupLocation).setRepositoryName(getBackupRepoName());
- if (backupCollection.getReplicas().size() > cluster.getJettySolrRunners().size()) {
- // may need to increase maxShardsPerNode (e.g. if it was shard split, then now we need more)
- //restore.setMaxShardsPerNode((int)Math.ceil(backupCollection.getReplicas().size()/cluster.getJettySolrRunners().size()));
- }
restore.setConfigName("confFaulty");
assertEquals(RequestStatusState.FAILED, restore.processAndWait(solrClient, 30));
@@ -331,20 +327,9 @@ public abstract class AbstractCloudBackupRestoreTestCase extends SolrCloudTestCa
}
int computeRestoreMaxShardsPerNode = (int) Math.ceil((restoreReplFactor * numShards/(double) cluster.getJettySolrRunners().size()));
- if (restoreReplFactor > backupReplFactor) { //else the backup maxShardsPerNode should be enough
- if (log.isInfoEnabled()) {
- log.info("numShards={} restoreReplFactor={} maxShardsPerNode={} totalNodes={}",
- numShards, restoreReplFactor, computeRestoreMaxShardsPerNode, cluster.getJettySolrRunners().size());
- }
-
- }
-
if (rarely()) { // Try with createNodeSet configuration
//Always 1 as cluster.getJettySolrRunners().size()=NUM_SHARDS=2
restore.setCreateNodeSet(cluster.getJettySolrRunners().get(0).getNodeName());
-// // we need to double maxShardsPerNode value since we reduced number of available nodes by half.
-// computeRestoreMaxShardsPerNode = origShardToDocCount.size() * restoreReplFactor;
-// restore.setMaxShardsPerNode(computeRestoreMaxShardsPerNode);
}
final int restoreMaxShardsPerNode = computeRestoreMaxShardsPerNode;
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/CustomCollectionTest.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/CustomCollectionTest.java
index 5e1524e..69187a0 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/CustomCollectionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/CustomCollectionTest.java
@@ -148,7 +148,6 @@ public class CustomCollectionTest extends SolrCloudTestCase {
String collectionName = "routeFieldColl";
int numShards = 4;
int replicationFactor = 2;
- int maxShardsPerNode = ((numShards * replicationFactor) / NODE_COUNT) + 1;
String shard_fld = "shard_s";
CollectionAdminRequest.createCollection(collectionName, "conf", numShards, replicationFactor)
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestRequestStatusCollectionAPI.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestRequestStatusCollectionAPI.java
index 58c4686..3c21200 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestRequestStatusCollectionAPI.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestRequestStatusCollectionAPI.java
@@ -49,7 +49,6 @@ public class TestRequestStatusCollectionAPI extends BasicDistributedZkTest {
params.set("numShards", numShards);
int replicationFactor = 1;
params.set("replicationFactor", replicationFactor);
- params.set("maxShardsPerNode", 100);
params.set("collection.configName", "conf1");
params.set(CommonAdminParams.ASYNC, "1000");
try {
@@ -130,7 +129,6 @@ public class TestRequestStatusCollectionAPI extends BasicDistributedZkTest {
params.set("name", "collection2");
params.set("numShards", 2);
params.set("replicationFactor", 1);
- params.set("maxShardsPerNode", 100);
params.set("collection.configName", "conf1");
params.set(CommonAdminParams.ASYNC, "1002");
try {
@@ -158,7 +156,6 @@ public class TestRequestStatusCollectionAPI extends BasicDistributedZkTest {
params.set("name", "collection3");
params.set("numShards", 1);
params.set("replicationFactor", 1);
- params.set("maxShardsPerNode", 100);
params.set("collection.configName", "conf1");
params.set(CommonAdminParams.ASYNC, "1002");
try {
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSimScenario.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSimScenario.java
index f246062..38e921a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSimScenario.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/TestSimScenario.java
@@ -42,7 +42,7 @@ public class TestSimScenario extends SimSolrCloudTestCase {
"// java comment\n" +
"create_cluster numNodes=2 // inline comment\n" +
"load_autoscaling json={'cluster-policy'+:+[{'replica'+:+'<3',+'shard'+:+'#EACH',+'collection'+:+'testCollection','node':'#ANY'}]}&defaultWaitFor=10\n" +
- "solr_request /admin/collections?action=CREATE&autoAddReplicas=true&name=testCollection&numShards=2&replicationFactor=2&maxShardsPerNode=2\n" +
+ "solr_request /admin/collections?action=CREATE&autoAddReplicas=true&name=testCollection&numShards=2&replicationFactor=2\n" +
"wait_collection collection=testCollection&shards=2&replicas=2\n" +
"event_listener trigger=.auto_add_replicas&stage=SUCCEEDED\n" +
"kill_nodes node=${_random_node_}\n" +
@@ -65,7 +65,7 @@ public class TestSimScenario extends SimSolrCloudTestCase {
String testSuggestionsScenario =
"create_cluster numNodes=2\n" +
"load_autoscaling json={'cluster-policy':[]}\n" +
- "solr_request /admin/collections?action=CREATE&autoAddReplicas=true&name=testCollection&numShards=2&replicationFactor=2&maxShardsPerNode=2\n" +
+ "solr_request /admin/collections?action=CREATE&autoAddReplicas=true&name=testCollection&numShards=2&replicationFactor=2\n" +
"wait_collection collection=testCollection&shards=2&replicas=2\n" +
"ctx_set key=myNode&value=${_random_node_}\n" +
"solr_request /admin/collections?action=ADDREPLICA&collection=testCollection&shard=shard1&node=${myNode}\n" +
@@ -124,7 +124,7 @@ public class TestSimScenario extends SimSolrCloudTestCase {
String indexingScenario =
"create_cluster numNodes=100\n" +
"load_autoscaling json={'cluster-policy':[]}\n" +
- "solr_request /admin/collections?action=CREATE&autoAddReplicas=true&name=testCollection&numShards=2&replicationFactor=2&maxShardsPerNode=2\n" +
+ "solr_request /admin/collections?action=CREATE&autoAddReplicas=true&name=testCollection&numShards=2&replicationFactor=2\n" +
"wait_collection collection=testCollection&shards=2&replicas=2\n" +
"solr_request /admin/autoscaling?httpMethod=POST&stream.body=" +
"{'set-trigger':{'name':'indexSizeTrigger','event':'indexSize','waitFor':'10s','aboveDocs':1000,'enabled':true,"+
@@ -148,7 +148,7 @@ public class TestSimScenario extends SimSolrCloudTestCase {
String splitShardScenario =
"create_cluster numNodes=2\n" +
"load_autoscaling json={'cluster-policy':[]}\n" +
- "solr_request /admin/collections?action=CREATE&name=testCollection&numShards=2&replicationFactor=2&maxShardsPerNode=5\n" +
+ "solr_request /admin/collections?action=CREATE&name=testCollection&numShards=2&replicationFactor=2\n" +
"wait_collection collection=testCollection&shards=2&replicas=2\n" +
"set_shard_metrics collection=testCollection&shard=shard1&INDEX.sizeInBytes=1000000000\n" +
"set_node_metrics nodeset=#ANY&freedisk=1.5\n" +
diff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
index 45a5ef8..e1daa87 100644
--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
@@ -742,7 +742,7 @@
-->
<!-- Controls the distribution of a query to shards other than itself.
Consider making 'preferLocalShards' true when:
- 1) maxShardsPerNode > 1
+ 1) more than 1 replica may be located on a node
2) Number of shards > 1
3) CloudSolrClient or LbHttpSolrServer is used by clients.
Without this option, every core broadcasts the distributed query to
diff --git a/solr/solrj/src/resources/apispec/collections.Commands.json b/solr/solrj/src/resources/apispec/collections.Commands.json
index 5fc7f76..2eb700f 100644
--- a/solr/solrj/src/resources/apispec/collections.Commands.json
+++ b/solr/solrj/src/resources/apispec/collections.Commands.json
@@ -76,10 +76,6 @@
"type": "boolean",
"description": "Controls whether or not the shard-replicas created for this collection will be assigned to the nodes specified by the nodeSet property in a sequential manner, or if the list of nodes should be shuffled prior to creating individual replicas. A 'false' value makes the results of a collection creation predictable and gives more exact control over the location of the individual shard-replicas, but 'true' can be a better choice for ensuring replicas are distributed e [...]
},
- "maxShardsPerNode": {
- "type": "integer",
- "description": "When creating collections, the shards and/or replicas are spread across all available, live, nodes, and two replicas of the same shard will never be on the same node. If a node is not live when the collection is created, it will not get any parts of the new collection, which could lead to too many replicas being created on a single live node. Defining maxShardsPerNode sets a limit on the number of replicas can be spread to each node. If the entire collection can [...]
- },
"autoAddReplicas": {
"type": "boolean",
"description": "When set to true, enables auto addition of replicas when the number of active replicas falls below the value set for replicationFactor.",
diff --git a/solr/solrj/src/test-files/solrj/solr/autoscaling/testAddMissingReplica.json b/solr/solrj/src/test-files/solrj/solr/autoscaling/testAddMissingReplica.json
index 6046945..6c202a5 100644
--- a/solr/solrj/src/test-files/solrj/solr/autoscaling/testAddMissingReplica.json
+++ b/solr/solrj/src/test-files/solrj/solr/autoscaling/testAddMissingReplica.json
@@ -112,7 +112,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"-1",
"autoAddReplicas":"false",
"nrtReplicas":"2",
"tlogReplicas":"0",
diff --git a/solr/solrj/src/test-files/solrj/solr/autoscaling/testAutoscalingPreferencesUsedWithNoPolicy.json b/solr/solrj/src/test-files/solrj/solr/autoscaling/testAutoscalingPreferencesUsedWithNoPolicy.json
index a4c39d4..4974eef 100644
--- a/solr/solrj/src/test-files/solrj/solr/autoscaling/testAutoscalingPreferencesUsedWithNoPolicy.json
+++ b/solr/solrj/src/test-files/solrj/solr/autoscaling/testAutoscalingPreferencesUsedWithNoPolicy.json
@@ -29,7 +29,6 @@
"port":8985}},
"clusterstate":{"c1":{
"router":{"name":"compositeId"},
- "maxShardsPerNode":-1,
"shards":{
"s1":{"replicas":{
"r1":{
diff --git a/solr/solrj/src/test-files/solrj/solr/autoscaling/testEmptyCollection.json b/solr/solrj/src/test-files/solrj/solr/autoscaling/testEmptyCollection.json
index 7dd4295..0da18b4 100644
--- a/solr/solrj/src/test-files/solrj/solr/autoscaling/testEmptyCollection.json
+++ b/solr/solrj/src/test-files/solrj/solr/autoscaling/testEmptyCollection.json
@@ -19,9 +19,8 @@
"router":{
"name":"compositeId",
"field":"shard_s"},
- "maxShardsPerNode":"-1",
"autoAddReplicas":"false",
"nrtReplicas":1,
"tlogReplicas":0}},
- "replicaInfo":{}}
\ No newline at end of file
+ "replicaInfo":{}}
diff --git a/solr/solrj/src/test-files/solrj/solr/autoscaling/testInfiniteLoop.json b/solr/solrj/src/test-files/solrj/solr/autoscaling/testInfiniteLoop.json
index ff1bf2a..dbc425d 100644
--- a/solr/solrj/src/test-files/solrj/solr/autoscaling/testInfiniteLoop.json
+++ b/solr/solrj/src/test-files/solrj/solr/autoscaling/testInfiniteLoop.json
@@ -9699,7 +9699,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -10073,7 +10072,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -10183,7 +10181,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -10232,7 +10229,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -10474,7 +10470,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -10827,7 +10822,6 @@
"type":"NRT",
"force_set_state":"false"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"4",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -10952,7 +10946,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"2",
"tlogReplicas":"0",
@@ -11001,7 +10994,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -11111,7 +11103,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -11806,7 +11797,6 @@
"type":"NRT",
"force_set_state":"false"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -11855,7 +11845,6 @@
"type":"NRT",
"force_set_state":"false"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -11965,7 +11954,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -12014,7 +12002,6 @@
"type":"NRT",
"force_set_state":"false"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -12050,7 +12037,6 @@
"type":"NRT",
"force_set_state":"false"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -12099,7 +12085,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -12148,7 +12133,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -12258,7 +12242,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -12566,7 +12549,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -12615,7 +12597,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -12664,7 +12645,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -12713,7 +12693,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
@@ -12781,7 +12760,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"2",
"tlogReplicas":"0",
@@ -13155,7 +13133,6 @@
"force_set_state":"false",
"leader":"true"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"1",
"autoAddReplicas":"false",
"nrtReplicas":"1",
"tlogReplicas":"0",
diff --git a/solr/solrj/src/test-files/solrj/solr/autoscaling/testMoveReplicasInMultipleCollections.json b/solr/solrj/src/test-files/solrj/solr/autoscaling/testMoveReplicasInMultipleCollections.json
index 16ba1a7..b515050 100644
--- a/solr/solrj/src/test-files/solrj/solr/autoscaling/testMoveReplicasInMultipleCollections.json
+++ b/solr/solrj/src/test-files/solrj/solr/autoscaling/testMoveReplicasInMultipleCollections.json
@@ -38,7 +38,6 @@
"type":"NRT"}}}},
"router":{
"name":"compositeId"},
- "maxShardsPerNode":"2",
"autoAddReplicas":"true",
"nrtReplicas":"2",
"tlogReplicas":"0"},
@@ -82,7 +81,6 @@
"leader":"true"}}}},
"router":{
"name":"compositeId"},
- "maxShardsPerNode":"2",
"autoAddReplicas":"true",
"nrtReplicas":"2",
- "tlogReplicas":"0"}}
\ No newline at end of file
+ "tlogReplicas":"0"}}
diff --git a/solr/solrj/src/test-files/solrj/solr/autoscaling/testUnresolvedSuggestion.json b/solr/solrj/src/test-files/solrj/solr/autoscaling/testUnresolvedSuggestion.json
index 19401de..e22b652 100644
--- a/solr/solrj/src/test-files/solrj/solr/autoscaling/testUnresolvedSuggestion.json
+++ b/solr/solrj/src/test-files/solrj/solr/autoscaling/testUnresolvedSuggestion.json
@@ -200,7 +200,6 @@
"type":"NRT",
"force_set_state":"false"}}}},
"router":{"name":"compositeId"},
- "maxShardsPerNode":"-1",
"autoAddReplicas":"false",
"nrtReplicas":"2",
"tlogReplicas":"0",
@@ -209,4 +208,4 @@
"live_nodes":["10.0.0.80:8983_solr",
"10.0.0.80:7574_solr",
"10.0.0.80:8984_solr"]}
-}
\ No newline at end of file
+}
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientCacheTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientCacheTest.java
index 1a671a8..d35f4d9 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientCacheTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientCacheTest.java
@@ -157,7 +157,6 @@ public class CloudSolrClientCacheTest extends SolrTestCaseJ4 {
private String coll1State = "{'gettingstarted':{\n" +
" 'replicationFactor':'2',\n" +
" 'router':{'name':'compositeId'},\n" +
- " 'maxShardsPerNode':'2',\n" +
" 'autoAddReplicas':'false',\n" +
" 'shards':{\n" +
" 'shard1':{\n" +