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:
Jason Tedor 2016-04-26 07:45:17 -04:00
parent 543b27f4cd
commit e3126dfac0
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}