Skip to content

fix: clean up childWorkflowComplete entry on child start failure - #2036

Merged
THardy98 merged 4 commits into
temporalio:mainfrom
aayushbaluni:fix/2000-orphaned-child-completions
Jul 30, 2026
Merged

THardy98 merged 4 commits into
temporalio:mainfrom
aayushbaluni:fix/2000-orphaned-child-completions

Conversation

@aayushbaluni

Copy link
Copy Markdown
Contributor

Problem

When a child workflow fails to start (e.g., cancelled or rejected), the completions.childWorkflowComplete map entry created during startChildWorkflowExecution is never removed. This causes a memory leak proportional to the number of failed child workflow starts over the parent workflow's lifetime.

Change

When resolveChildWorkflowExecutionStart handles a failed/cancelled start, delete the corresponding childWorkflowComplete completion entry since no completion event will ever arrive for it.

Fixes #2000.

@aayushbaluni
aayushbaluni requested a review from a team as a code owner May 2, 2026 03:21
@CLAassistant

CLAassistant commented May 2, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@aayushbaluni
aayushbaluni force-pushed the fix/2000-orphaned-child-completions branch from a247a39 to 2d8b286 Compare May 13, 2026 14:52
@aayushbaluni
aayushbaluni force-pushed the fix/2000-orphaned-child-completions branch from 2d8b286 to 19ddc62 Compare May 29, 2026 02:58
@aayushbaluni
aayushbaluni force-pushed the fix/2000-orphaned-child-completions branch from 19ddc62 to 922df29 Compare June 2, 2026 12:30
@THardy98
THardy98 merged commit 613608b into temporalio:main Jul 30, 2026
42 of 45 checks passed
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

3 participants