Guard against null routing node iterator

This commit is contained in:
Jason Tedor 2016-02-02 18:14:37 -05:00
parent a3a49a12ef
commit 8b37827ac6
1 changed files with 6 additions and 0 deletions

View File

@ -415,6 +415,12 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent<Indic
RoutingTable routingTable = event.state().routingTable();
RoutingNodes.RoutingNodeIterator routingNode = event.state().getRoutingNodes().routingNodeIter(event.state().nodes().localNodeId());
if (routingNode == null) {
failedShards.clear();
return;
}
DiscoveryNodes nodes = event.state().nodes();
for (final ShardRouting shardRouting : routingNode) {