temporal icon indicating copy to clipboard operation
temporal copied to clipboard

Atomic workflow reset & update

Open boonsuen opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

  • The use case is to reset the workflow to a previous point and immediately sends a update request to update the state.
  • Currently, reset & update cannot be applied together. Update can happen milliseconds~second later after reset. There could be a race that when the code rely on the updated state after reset immediately, but the update request is not guaranteed to be applied atomically with reset, resulting in the reset-ed workflow execution continues with the "old" state.

Describe the solution you'd like Provide a API, preferably something like ResetWithUpdate(...) to reset to a point of event with the update request fulfilled.

Describe alternatives you've considered Using workflow.Await but the approach comes with extra flags to control the logic flow.

Additional context

  • Slack source: https://temporalio.slack.com/archives/CTDTU3J4T/p1733236562254059

boonsuen avatar Dec 07 '24 14:12 boonsuen

Moving to features since this would apply to all SDK's and would also require server support

Quinn-With-Two-Ns avatar Dec 17 '24 11:12 Quinn-With-Two-Ns

Since this is a large request that would require substantial server work, transferring to server for triage

Sushisource avatar Apr 01 '25 17:04 Sushisource

Any update on this? @Sushisource @Quinn-With-Two-Ns

ichinna avatar Oct 15 '25 19:10 ichinna