馃挜 Fix unbounded timeout failure chain in local activity - #3006
Merged
Conversation
maciejdudko
reviewed
Aug 13, 2026
Comment on lines
+103
to
+104
| @Test(timeout = 120_000) | ||
| public void repeatedTimeoutsDoNotBuildAnUnboundedFailureChain() { |
Contributor
There was a problem hiding this comment.
Is it possible to redesign this test in a way that requires shorter execution time? Either by reducing timeouts/retry intervals or by using time skipping?
Contributor
Author
There was a problem hiding this comment.
Yeah we don't need to do 53 I was just copying what the customer reported
maciejdudko
approved these changes
Aug 13, 2026
Quinn-With-Two-Ns
force-pushed
the
issue-3005
branch
from
August 13, 2026 15:37
dc1d195 to
df1786e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
Local activities retried across the local-retry threshold were carrying the entire ActivityFailure wrapper into each new attempt. Repeated timeouts therefore created an unbounded nested failure chain, cuasing oversized histories or serialization failures.
Why?
Was causing the failure to grow very large and even fail the workflow it got so large.
Checklist
Closes Local activity retries build a
Failurechain the SDK cannot deserialize聽#3005How was this tested:
Note
Medium Risk
Touches core local-activity retry and failure propagation in the workflow sync path; behavior change is narrow but could affect failure shape seen by workflows and history markers.
Overview
Fixes local activity retries that cross the local retry threshold so they no longer grow an unbounded nested failure chain on repeated failures (e.g. timeouts).
When scheduling the next attempt after backoff,
SyncWorkflowContextnow passeslaException.getFailure().getCause()aspreviousExecutionFailureinstead of the full wrapper failure. That keeps only the underlying attempt failure (e.g.TimeoutFailure) linked across attempts, avoiding oversized workflow history and serialization blowups.A new integration test
repeatedTimeoutsDoNotBuildAnUnboundedFailureChainasserts that after max attempts the surfacedActivityFailurehas at most two chainedTimeoutFailurenodes, with the oldest having no further cause.Reviewed by Cursor Bugbot for commit df1786e. Bugbot is set up for automated code reviews on this repo. Configure here.