Update Operation might hang (rarely) when retrying on invalid shard state
The retry logic when failing does not reset the operation started flag... closes #3769
This commit is contained in:
parent
4f8c20f3fe
commit
4370dfed76
|
@ -192,7 +192,10 @@ public abstract class TransportInstanceSingleOperationAction<Request extends Ins
|
||||||
shardOperation(request, listener);
|
shardOperation(request, listener);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
if (retryOnFailure(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 {
|
} else {
|
||||||
listener.onFailure(e);
|
listener.onFailure(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue