Skip to content

Commit

Permalink
Fix timeout during operation retry (#2221)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdoerner authored Sep 17, 2024
1 parent 21d15ae commit 6f0cf07
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,12 @@ private static void timeoutNexusOperation(
private static State failNexusOperation(
RequestContext ctx, NexusOperationData data, Failure failure, long notUsed) {
RetryState retryState = attemptNexusOperationRetry(ctx, Optional.of(failure), data);
if (retryState == RetryState.RETRY_STATE_IN_PROGRESS) {
if (retryState == RetryState.RETRY_STATE_IN_PROGRESS
|| retryState == RetryState.RETRY_STATE_TIMEOUT) {
// RETRY_STATE_TIMEOUT indicates that the next attempt schedule time would exceed the
// operation's schedule-to-close timeout, so do not fail the operation here and allow
// it to be timed out by the timer set in
// io.temporal.internal.testservice.TestWorkflowMutableStateImpl.timeoutNexusOperation
return (Strings.isNullOrEmpty(data.operationId)) ? INITIATED : STARTED;
}

Expand Down

0 comments on commit 6f0cf07

Please sign in to comment.