Skip to content

Commit 0359fc8

Browse files
committed
pick child workflow id check (cadence-workflow#3994)
1 parent 10fba4f commit 0359fc8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

service/history/historyEngine.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Copyright (c) 2017 Uber Technologies, Inc.
1+
// Copyright (c) 2017-2021 Uber Technologies, Inc.
2+
// Portions of the Software are attributed to Copyright (c) 2021 Temporal Technologies Inc.
23
//
34
// Permission is hereby granted, free of charge, to any person obtaining a copy
45
// of this software and associated documentation files (the "Software"), to deal
@@ -2399,6 +2400,9 @@ func (e *historyEngineImpl) RecordChildExecutionCompleted(
23992400
if !isRunning || ci.StartedID == common.EmptyEventID {
24002401
return &types.EntityNotExistsError{Message: "Pending child execution not found."}
24012402
}
2403+
if ci.StartedWorkflowID != completedExecution.GetWorkflowID() {
2404+
return &types.EntityNotExistsError{Message: "Pending child execution not found."}
2405+
}
24022406

24032407
switch *completionEvent.EventType {
24042408
case types.EventTypeWorkflowExecutionCompleted:

0 commit comments

Comments
 (0)