Skip to content

Commit

Permalink
Update Operation might hang (rarely) when retrying on invalid shard s…
Browse files Browse the repository at this point in the history
…tate

The retry logic when failing does not reset the operation started flag...
closes #3769
  • Loading branch information
kimchy committed Sep 24, 2013
1 parent e4325ef commit 3ef87ec
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -192,7 +192,10 @@ public void run() {
shardOperation(request, listener);
} catch (Throwable e) {
if (retryOnFailure(e)) {
retry(fromClusterEvent, null);
operationStarted.set(false);
// we already marked it as started when we executed it (removed the listener) so pass false
// to re-add to the cluster listener
retry(false, null);
} else {
listener.onFailure(e);
}
Expand Down

0 comments on commit 3ef87ec

Please sign in to comment.