From f63d221b95759714d8f47094e39b0ea857f45276 Mon Sep 17 00:00:00 2001 From: Yu Xia Date: Thu, 18 Feb 2021 00:09:44 -0800 Subject: [PATCH 1/2] pick child workflow id check --- service/history/historyEngine.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/history/historyEngine.go b/service/history/historyEngine.go index f68c64bb5ce..703f0126048 100644 --- a/service/history/historyEngine.go +++ b/service/history/historyEngine.go @@ -2399,6 +2399,9 @@ func (e *historyEngineImpl) RecordChildExecutionCompleted( if !isRunning || ci.StartedID == common.EmptyEventID { return &types.EntityNotExistsError{Message: "Pending child execution not found."} } + if ci.StartedWorkflowID != completedExecution.GetWorkflowID() { + return &types.EntityNotExistsError{Message: "Pending child execution not found."} + } switch *completionEvent.EventType { case types.EventTypeWorkflowExecutionCompleted: From 3037490c927b48455c7807418fc2c705603e79b3 Mon Sep 17 00:00:00 2001 From: Yu Xia Date: Thu, 18 Feb 2021 00:13:11 -0800 Subject: [PATCH 2/2] update header --- service/history/historyEngine.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service/history/historyEngine.go b/service/history/historyEngine.go index 703f0126048..9ff63f4d898 100644 --- a/service/history/historyEngine.go +++ b/service/history/historyEngine.go @@ -1,4 +1,5 @@ -// Copyright (c) 2017 Uber Technologies, Inc. +// Copyright (c) 2017-2021 Uber Technologies, Inc. +// Portions of the Software are attributed to Copyright (c) 2021 Temporal Technologies Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal