Guard against null routing node iterator
This commit is contained in:
parent
a3a49a12ef
commit
8b37827ac6
|
@ -415,6 +415,12 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent<Indic
|
||||||
|
|
||||||
RoutingTable routingTable = event.state().routingTable();
|
RoutingTable routingTable = event.state().routingTable();
|
||||||
RoutingNodes.RoutingNodeIterator routingNode = event.state().getRoutingNodes().routingNodeIter(event.state().nodes().localNodeId());
|
RoutingNodes.RoutingNodeIterator routingNode = event.state().getRoutingNodes().routingNodeIter(event.state().nodes().localNodeId());
|
||||||
|
|
||||||
|
if (routingNode == null) {
|
||||||
|
failedShards.clear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DiscoveryNodes nodes = event.state().nodes();
|
DiscoveryNodes nodes = event.state().nodes();
|
||||||
|
|
||||||
for (final ShardRouting shardRouting : routingNode) {
|
for (final ShardRouting shardRouting : routingNode) {
|
||||||
|
|
Loading…
Reference in New Issue