initialize the nodes before a possible retry, so we have the local node id for it
This commit is contained in:
parent
39e546b64d
commit
15cf7a2361
|
@ -246,11 +246,11 @@ public abstract class TransportShardReplicationOperationAction<Request extends S
|
|||
*/
|
||||
public boolean start(final boolean fromClusterEvent) throws ElasticSearchException {
|
||||
ClusterState clusterState = clusterService.state();
|
||||
nodes = clusterState.nodes();
|
||||
if (!indicesService.hasIndex(request.index()) || !clusterState.routingTable().hasIndex(request.index())) {
|
||||
retryPrimary(fromClusterEvent, null);
|
||||
return false;
|
||||
}
|
||||
nodes = clusterState.nodes();
|
||||
try {
|
||||
shards = shards(clusterState, request);
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in New Issue