initialize the nodes before a possible retry, so we have the local node id for it

This commit is contained in:
kimchy 2010-07-21 01:53:00 +03:00
parent 39e546b64d
commit 15cf7a2361
1 changed files with 1 additions and 1 deletions

View File

@ -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) {