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

Always schedule first workflow task for started abandoned child #2414

Merged
merged 4 commits into from
May 5, 2022

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented Jan 25, 2022

What changed?

  • Schedule first workflow task for started abandoned child regardless if parent workflow is closed or not

Why?

  • For abandoned it's possible that the child workflow is started and record in parent history, yet has no workflow task scheduled and child workflow will be blocked until timeout. This is ok for child with terminate or cancel parent close policy. But not for those with abandon policy, those should continue their execution.
  • Pick Schedule first decision for abandoned child if parent closed uber/cadence#4579

How did you test it?

  • Added unit test

Potential risks

Is hotfix candidate?

@yycptt yycptt requested a review from a team January 25, 2022 18:50
@yycptt yycptt closed this Apr 19, 2022
@yycptt yycptt reopened this May 5, 2022
@yycptt yycptt force-pushed the fix-abandoned-child-start branch from e0c1672 to cfeb5b7 Compare May 5, 2022 02:28
@yycptt yycptt requested a review from a team as a code owner May 5, 2022 02:28
@yycptt yycptt requested a review from yiminc May 5, 2022 02:30
Comment on lines +666 to +669
// To resolve the issue above, we need to
// 1. Start child workflow and schedule the first workflow task in one transaction. Use runID to perform deduplication
// 2. Standby start child logic need to verify if child worflow actually started instead of relying on the information
// in parent mutable state.
Copy link
Member

Choose a reason for hiding this comment

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

👍 looking forward for the fix to these 2 items.

@yycptt yycptt merged commit 3912a3e into temporalio:master May 5, 2022
@yycptt yycptt deleted the fix-abandoned-child-start branch May 5, 2022 18:54
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.

None yet

2 participants