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 23:38:03 UTC
[lucene-solr] branch jira/solr14089 updated: Changing ZkStateReader
to read state from SSP instead of directly from Replica.getState
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 edfdd63 Changing ZkStateReader to read state from SSP instead of directly from Replica.getState
edfdd63 is described below
commit edfdd63f756176762f999909b6f8b39dec9cafec
Author: Ishan Chattopadhyaya <is...@apache.org>
AuthorDate: Wed Dec 18 05:05:22 2019 +0530
Changing ZkStateReader to read state from SSP instead of directly from Replica.getState
---
solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
index 47dd66f..29715c9 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
@@ -1073,8 +1073,9 @@ public class ZkStateReader implements SolrCloseable {
String coreNodeName = entry.getValue().getName();
if (clusterState.liveNodesContain(nodeProps.getNodeName()) && !coreNodeName.equals(thisCoreNodeName)) {
- if (mustMatchStateFilter == null || mustMatchStateFilter == Replica.State.getState(nodeProps.getState())) {
- if (mustNotMatchStateFilter == null || mustNotMatchStateFilter != Replica.State.getState(nodeProps.getState())) {
+ Replica.State repState = getShardStateProvider(collection).getState(entry.getValue());
+ if (mustMatchStateFilter == null || mustMatchStateFilter == repState) {
+ if (mustNotMatchStateFilter == null || mustNotMatchStateFilter != repState) {
nodes.add(nodeProps);
}
}