Skip to content

Conversation

@robholland
Copy link
Contributor

@robholland robholland commented Jan 7, 2026

What changed?

Added the ability for transfer task handlers to release the workflow lock early.

Why?

This lowers lock contention for cases where a GRPC request will be made after mutable state is no longer required.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Note

Introduces earlier workflow lock release in standby processing to minimize lock contention and blocking during remote calls.

  • Extends standbyActionFn to accept ReleaseWorkflowContextFunc and propagates it through timer and transfer standby executors
  • Updates multiple standby actions (e.g., processCloseExecution, processStartChildExecution, CHASM and timer handlers) to copy needed fields and call release(nil) before gRPC verifications (e.g., VerifyChildExecutionCompletionRecorded, VerifyFirstWorkflowTaskScheduled) or other external operations
  • Ensures release(nil) is idempotent and still invoked post-action; adds comments and minor refactors around post-action handling and discard checks

Written by Cursor Bugbot for commit 025ab51. This will update automatically on new commits. Configure here.

@robholland robholland requested review from a team as code owners January 7, 2026 22:46
@robholland
Copy link
Contributor Author

I considered the alternative of moving the GRPC requests to postAction as the lock is release before that is called, but that felt like it was distorting the action vs postAction just to abuse the lock scope, so preferred this approach.

@robholland
Copy link
Contributor Author

Also the active executor releases the lock in it's actions, it just doesn't have the action vs post split that the standby does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant