Skip to content

Commit

Permalink
Fix record child completion mutable state stale check (#2885)
Browse files Browse the repository at this point in the history
  • Loading branch information
yycptt committed May 21, 2022
1 parent dc39bc7 commit 3fff3f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion service/history/historyEngine.go
Original file line number Diff line number Diff line change
Expand Up @@ -2401,7 +2401,8 @@ func (e *historyEngineImpl) RecordChildExecutionCompleted(

// Check mutable state to make sure child execution is in pending child executions
ci, isRunning := mutableState.GetChildExecutionInfo(initiatedID)
if !isRunning && initiatedID >= mutableState.GetNextEventID() {
if (!isRunning && initiatedID >= mutableState.GetNextEventID()) ||
(isRunning && ci.StartedId == common.EmptyEventID) {
// possible stale mutable state, try reload mutable state
//
// TODO: use initiate event ID and version to verify if the child exists or not
Expand Down

0 comments on commit 3fff3f0

Please sign in to comment.