Preserve the original workflow start time on RebuildMutableState - #11668
Merged
Conversation
rodrigozhou
approved these changes
Aug 20, 2026
simvlad
force-pushed
the
fix-rebuild-preserve-start-time
branch
2 times, most recently
from
August 20, 2026 20:09
f0c02b6 to
f124cd2
Compare
Member
I think we need to discuss this. The command is not that useful if stuck execution will be immediately timedout after rebuild. And I think we observed case where after rebuild an execution timedout immediately even with current implementation. |
Contributor
Author
|
Discussed, we will:
|
yiminc
approved these changes
Aug 24, 2026
simvlad
force-pushed
the
fix-rebuild-preserve-start-time
branch
from
August 31, 2026 23:50
56d804a to
8f39ab7
Compare
Contributor
Author
|
@yycptt - fixed, updated both execution and run deadlines and recorded the last rebuilt time on the mutable state |
simvlad
force-pushed
the
fix-rebuild-preserve-start-time
branch
from
September 1, 2026 05:04
8f39ab7 to
8177b39
Compare
yycptt
approved these changes
Sep 1, 2026
simvlad
force-pushed
the
fix-rebuild-preserve-start-time
branch
from
September 2, 2026 00:09
1c87f9c to
5585364
Compare
stuart-wells
approved these changes
Sep 2, 2026
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 changed?
AdminRebuildMutableState, invoked bytdbg workflow rebuild, no longer replaces the mutable statestart time with the current time. It reuses the run's recorded start time, falling back to
ExecutionInfo.StartTime. Only if bothExecutionState.StartTimeandExecutionInfo.StartTimeareempty, the current time will be used.
The rebuild now also refreshes the timeout timer tasks so the run and execution deadlines are anchoraed at the time of the call, which is what reset already does. Without it, preserving the start time would make a workflow rebuild after its deadline timeout immediately. It also records ExecutionInfo.MutableStateRebuildTime so that a repaired run could be identify by operator.
Why?
Moving the start time to now, often results in workflow with a negative duration, since the end time is kept as is. Downstream systems may handle this incorrectly.
How did you test it?
Potential risks