From 8dfdca9ce399f7e4b49ba662f83c66cf068bb972 Mon Sep 17 00:00:00 2001 From: wenquan xing Date: Tue, 16 Feb 2021 09:53:09 -0800 Subject: [PATCH] Add additional check on started child workflow ID --- service/history/historyEngine.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/history/historyEngine.go b/service/history/historyEngine.go index f23c2bdccc1..cab0e2bc578 100644 --- a/service/history/historyEngine.go +++ b/service/history/historyEngine.go @@ -2149,6 +2149,9 @@ func (e *historyEngineImpl) RecordChildExecutionCompleted( if !isRunning || ci.StartedId == common.EmptyEventID { return serviceerror.NewNotFound("Pending child execution not found.") } + if ci.GetStartedWorkflowId() != completedExecution.GetWorkflowId() { + return serviceerror.NewNotFound("Pending child execution not found.") + } switch completionEvent.GetEventType() { case enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED: