temporalio / temporalio/temporal

1.27.1 - Multiple ChildWorkflowStarted events written for same child workflow

Open
#7,591 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

potential-bug
Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Community thread https://temporalio.slack.com/archives/CTRCR8RBP/p1744049342207489

TS SDK, user starting a number of child workflows async, in scenario where workflow wants to continueasnew
and server fails it with UnhandledCommand, server also seems to record a second ChildWorkflowExecutionStarted (seems buffered / resurrected) event to event history after workflow task failure.

Sample event history:

 {
      "eventId": "4746",
      "eventTime": "2025-04-08T13:27:43.099430181Z",
      "eventType": "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED",
      ...
    }
    {
      "eventId": "4751",
      "eventTime": "2025-04-08T13:27:43.115638093Z",
      "eventType": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED",
      "taskId": "24810703",
      "childWorkflowExecutionStartedEventAttributes": {
        "initiatedEventId": "4746",
        "workflowExecution": {
          "workflowId": "example-9205",
          "runId": "01961595-d504-72b6-ac7d-b5ca3fdb6489"
        },
        ...
    }
    {
      "eventId": "4855",
      "eventTime": "2025-04-08T13:27:43.115638093Z",
      "eventType": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED",
      "taskId": "24810959",
      "childWorkflowExecutionStartedEventAttributes": {
        "initiatedEventId": "4746",
        "workflowExecution": {
          "runId": "01961595-d504-72b6-ac7d-b5ca3fdb6489"
      ...
    }
    {
      "eventId": "4907",
      "eventTime": "2025-04-08T13:28:23.518183956Z",
      "eventType": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED",
        "workflowExecution": {
          "runId": "01961595-d504-72b6-ac7d-b5ca3fdb6489"
        },
        "initiatedEventId": "4746",
        "startedEventId": "4855"
      ...
    }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the sample event history and the linked community thread, then trace the server handling around ContinueAsNew, UnhandledCommand, and child-workflow start events. Reproduce the workflow-task failure scenario and verify that a single initiated event does not produce duplicate ChildWorkflowExecutionStarted events.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, typescript
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.