Fix index name equality check in RoutingNodes
This commit fixes an index name equality check in RoutingNodes. Namely, the check was comparing an instance of Index to an instance of String. Instead, the index name should be obtained from the Index instance to be compared to the instance of String. Closes #17982
This commit is contained in:
parent
543b27f4cd
commit
e3126dfac0
|
@ -397,7 +397,7 @@ public class RoutingNodes implements Iterable<RoutingNode> {
|
|||
for (ShardRoutingState s : state) {
|
||||
if (s == ShardRoutingState.UNASSIGNED) {
|
||||
for (ShardRouting unassignedShard : unassignedShards) {
|
||||
if (unassignedShard.index().equals(index)) {
|
||||
if (unassignedShard.index().getName().equals(index)) {
|
||||
shards.add(unassignedShard);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue