You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by is...@apache.org on 2019/12/17 22:00:09 UTC
[lucene-solr] branch jira/solr14089 updated: Fixing
CollectionReloadTest by moving OCMH's use of Replica.State.getState() to
SSP
This is an automated email from the ASF dual-hosted git repository.
ishan pushed a commit to branch jira/solr14089
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/jira/solr14089 by this push:
new 2d18871 Fixing CollectionReloadTest by moving OCMH's use of Replica.State.getState() to SSP
2d18871 is described below
commit 2d188714f8e0d6b576c13b0fb1aa8a0c7bb62e7e
Author: Ishan Chattopadhyaya <is...@apache.org>
AuthorDate: Wed Dec 18 03:29:56 2019 +0530
Fixing CollectionReloadTest by moving OCMH's use of Replica.State.getState() to SSP
---
.../solr/cloud/api/collections/OverseerCollectionMessageHandler.java | 2 +-
.../org/apache/solr/cloud/api/collections/CollectionReloadTest.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerCollectionMessageHandler.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerCollectionMessageHandler.java
index 0961993..2198564 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerCollectionMessageHandler.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerCollectionMessageHandler.java
@@ -970,7 +970,7 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler,
Slice slice, ShardHandler shardHandler) {
List<Replica> notLiveReplicas = new ArrayList<>();
for (Replica replica : slice.getReplicas()) {
- if ((stateMatcher == null || Replica.State.getState(replica.getStr(ZkStateReader.STATE_PROP)) == stateMatcher)) {
+ if ((stateMatcher == null || zkStateReader.getShardStateProvider(replica.getCollection()).getState(replica) == stateMatcher)) {
if (clusterState.liveNodesContain(replica.getStr(ZkStateReader.NODE_NAME_PROP))) {
// For thread safety, only simple clone the ModifiableSolrParams
ModifiableSolrParams cloneParams = new ModifiableSolrParams();
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionReloadTest.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionReloadTest.java
index 02e445f..5255cd0 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionReloadTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionReloadTest.java
@@ -51,7 +51,7 @@ public class CollectionReloadTest extends SolrCloudTestCase {
log.info("testReloadedLeaderStateAfterZkSessionLoss initialized OK ... running test logic");
final String testCollectionName = "c8n_1x1";
- CollectionAdminRequest.createCollection(testCollectionName, "conf", 1, 1)
+ CollectionAdminRequest.createCollection(testCollectionName, "conf", 1, 1).setExternalState(true)
.process(cluster.getSolrClient());