Skip to content

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

Open
aayushbaluni wants to merge 1 commit intotemporalio:mainfrom
aayushbaluni:fix/2000-orphaned-child-completions
Open

fix: clean up childWorkflowComplete entry on child start failure#2036
aayushbaluni wants to merge 1 commit intotemporalio:mainfrom
aayushbaluni:fix/2000-orphaned-child-completions

Conversation

@aayushbaluni
Copy link
Copy Markdown

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
Copy link
Copy Markdown

CLAassistant commented May 2, 2026

CLA assistant check
All committers have signed the CLA.

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