Skip to content

Commit

Permalink
Update if statement format
Browse files Browse the repository at this point in the history
  • Loading branch information
yux0 committed Mar 14, 2020
1 parent a37d388 commit 319fce6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion service/history/historyEngine.go
Original file line number Diff line number Diff line change
Expand Up @@ -2904,8 +2904,13 @@ func (e *historyEngineImpl) ReapplyEvents(
return nil, err
}
for _, event := range reapplyEvents {
if event.GetVersion() == lastWriteVersion {
// The reapply is from the same cluster. Ignoring.
continue
}
dedupResource := definition.NewEventReappliedID(runID, event.GetEventId(), event.GetVersion())
if event.GetVersion() == lastWriteVersion || mutableState.IsResourceDuplicated(dedupResource) {
if mutableState.IsResourceDuplicated(dedupResource) {
// already apply the signal
continue
}
toReapplyEvents = append(toReapplyEvents, event)
Expand Down

0 comments on commit 319fce6

Please sign in to comment.