diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 24501bb00a3..fb64188b79b 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -226,6 +226,8 @@ Bug Fixes * SOLR-8748: OverseerTaskProcessor limits number of concurrent tasks to just 10 even though the thread pool size is 100. The limit has now been increased to 100. (Scott Blum, shalin) +* SOLR-8375: ReplicaAssigner rejects valid nodes (Kelvin Tan, noble) + Optimizations ---------------------- * SOLR-7876: Speed up queries and operations that use many terms when timeAllowed has not been diff --git a/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java b/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java index 51d984813a6..c9f774f7062 100644 --- a/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java +++ b/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java @@ -44,11 +44,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static java.util.Collections.singletonList; -import static org.apache.solr.cloud.rule.Rule.MatchStatus.NODE_CAN_BE_ASSIGNED; -import static org.apache.solr.cloud.rule.Rule.Phase.ASSIGN; -import static org.apache.solr.cloud.rule.Rule.Phase.FUZZY_ASSIGN; -import static org.apache.solr.cloud.rule.Rule.Phase.FUZZY_VERIFY; -import static org.apache.solr.cloud.rule.Rule.Phase.VERIFY; +import static org.apache.solr.cloud.rule.Rule.MatchStatus.*; +import static org.apache.solr.cloud.rule.Rule.Phase.*; import static org.apache.solr.common.util.StrUtils.formatString; import static org.apache.solr.common.util.Utils.getDeepCopy; @@ -280,7 +277,7 @@ public class ReplicaAssigner { Rule rule = rules.get(rulePermutation[i]); Rule.MatchStatus matchStatus = rule.tryAssignNodeToShard(e.getValue(), copyOfCurrentState, nodeVsTagsCopy, e.getKey().shard, fuzzyPhase ? FUZZY_VERIFY : VERIFY); - if (matchStatus != NODE_CAN_BE_ASSIGNED) return null; + if (matchStatus != NODE_CAN_BE_ASSIGNED && matchStatus != NOT_APPLICABLE) return null; } } return result; diff --git a/solr/example/files/conf/params.json b/solr/example/files/conf/params.json index d93c1d9232f..22aadccdd07 100644 --- a/solr/example/files/conf/params.json +++ b/solr/example/files/conf/params.json @@ -22,9 +22,13 @@ "debug":"true", "hl.simple.pre":"HL_START", "hl.simple.post":"HL_END", + "echoParams": "explicit", + "_appends_": { + "fq": "{!switch v=$type tag=type case='*:*' case.all='*:*' case.unknown='-doc_type:[* TO *]' default=$type_fq}" + }, "":{"v":0}}, "velocity":{ "wt":"velocity", "v.template":"browse", "v.layout":"layout", - "":{"v":0}}}} \ No newline at end of file + "":{"v":0}}}} diff --git a/solr/example/files/conf/solrconfig.xml b/solr/example/files/conf/solrconfig.xml index ba1d2036143..97682f62d6d 100644 --- a/solr/example/files/conf/solrconfig.xml +++ b/solr/example/files/conf/solrconfig.xml @@ -804,15 +804,8 @@ - - - explicit - - - - {!switch v=$type tag=type case='*:*' case.all='*:*' case.unknown='-doc_type:[* TO *]' default=$type_fq} - - + +