Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reset] Override ID reuse and conflict policy when starting child #7236

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

gow
Copy link
Contributor

@gow gow commented Feb 4, 2025

What changed?

  • Added is_reset_run in ParentExecutionInfo
  • Overriding startRequest.WorkflowIdReusePolicy & startRequest.WorkflowIdConflictPolicy for children that were recorded in the executionInfo.ChildrenInitializedPostResetPoint
  • Once a child is started with the overridden policies, we set executionInfo.ChildrenInitializedPostResetPoint[childID] = false so that we don't do this again if the parent starts another instance of the same child.

Why?

This is needed so that the parent can terminate any running children that were started in the previous run. Without this after reset, the parent may not make progress.

How did you test it?

Manual testing. Will add functional tests in followup PRs once the feature is ready.

Potential risks

N/A

Documentation

No. Documentation change is pending.

Is hotfix candidate?

No

@gow gow requested a review from a team as a code owner February 4, 2025 20:03
@gow gow marked this pull request as draft February 4, 2025 20:03
@gow gow changed the title Cg/reset before child init 3 [Reset][Phase-2] Override ID reuse and conflict policy when starting child Feb 4, 2025
@gow gow changed the title [Reset][Phase-2] Override ID reuse and conflict policy when starting child [Reset] Override ID reuse and conflict policy when starting child Feb 4, 2025
@gow gow force-pushed the cg/reset_before_child_init_1 branch from 6015fef to 2814a46 Compare February 4, 2025 20:14
@gow gow requested a review from yycptt February 4, 2025 20:55
@gow gow marked this pull request as ready for review February 4, 2025 22:35
@gow gow force-pushed the cg/reset_before_child_init_1 branch from 2814a46 to 695190a Compare February 4, 2025 22:39
@@ -37,6 +37,7 @@ message ParentExecutionInfo {
int64 initiated_id = 4;
temporal.server.api.clock.v1.VectorClock clock = 5;
int64 initiated_version = 6;
bool is_reset_run = 7;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably make this a ChildWorkflowOnly field in StartWorkflowExecutionRequest, similar to what we have in Terminate/CancelWorkflowExecutionRequest. You only need it perform a parent/child check when terminating the current child right?

We can put the field here but also need to update other usages of this message I guess.

Base automatically changed from cg/reset_before_child_init_1 to main February 5, 2025 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants