Skip to content

fix: clean up orphaned childWorkflowComplete entries on start failure#2119

Open
Malaybhai11 wants to merge 1 commit into
temporalio:mainfrom
Malaybhai11:fix/orphaned-child-workflow-complete
Open

fix: clean up orphaned childWorkflowComplete entries on start failure#2119
Malaybhai11 wants to merge 1 commit into
temporalio:mainfrom
Malaybhai11:fix/orphaned-child-workflow-complete

Conversation

@Malaybhai11

Copy link
Copy Markdown

Fixes #2000

When resolveChildWorkflowExecutionStart receives a failed or cancelled result, the childWorkflowComplete completion map still gets entries added but they are never consumed because resolveChildWorkflowExecution is never called for a workflow that never started.

This adds maybeConsumeCompletion calls in both the failed and cancelled branches to clean up orphaned entries.

When a child workflow start fails or is cancelled, the
childWorkflowComplete map still gets entries added. This causes
memory leaks over time.

Added maybeConsumeCompletion calls in the failed and cancelled
branches of resolveChildWorkflowExecutionStart to clean up
orphaned entries.

Fixes temporalio#2000
@Malaybhai11 Malaybhai11 requested a review from a team as a code owner June 14, 2026 02:48
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

[Bug] Orphaned childWorkflowComplete entries on start failure

2 participants