when retrying on primary shard when node disconnected, add it again the the cluster service as a listener

This commit is contained in:
kimchy 2010-07-23 01:07:09 +03:00
parent 8875b9641b
commit 34b84b0e61
1 changed files with 3 additions and 1 deletions

View File

@ -298,7 +298,9 @@ public abstract class TransportShardReplicationOperationAction<Request extends S
if (exp.unwrapCause() instanceof ConnectTransportException || exp.unwrapCause() instanceof NodeCloseException ||
exp.unwrapCause() instanceof IllegalIndexShardStateException) {
primaryOperationStarted.set(false);
retryPrimary(fromClusterEvent, shard.shardId());
// we already marked it as started when we executed it (removed the listener) so pass false
// to re-add to the cluster listener
retryPrimary(false, shard.shardId());
} else {
listener.onFailure(exp);
}