Skip to content

Commit

Permalink
Revert "Remove unused history event check (temporalio#3373)"
Browse files Browse the repository at this point in the history
This reverts commit 5e6b2d7.
  • Loading branch information
yux0 committed Sep 16, 2022
1 parent c9e8f49 commit 6b78365
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion service/history/workflow/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -672,13 +672,16 @@ func (c *ContextImpl) SetWorkflowExecution(ctx context.Context, now time.Time) (
}
}()

resetWorkflowSnapshot, _, err := c.MutableState.CloseTransactionAsSnapshot(
resetWorkflowSnapshot, resetWorkflowEventsSeq, err := c.MutableState.CloseTransactionAsSnapshot(
now,
TransactionPolicyPassive,
)
if err != nil {
return err
}
if len(resetWorkflowEventsSeq) != 0 {
return serviceerror.NewInternal("SetWorkflowExecution encountered new events")
}

resetWorkflowSnapshot.ExecutionInfo.ExecutionStats = &persistencespb.ExecutionStats{
HistorySize: c.GetHistorySize(),
Expand Down

0 comments on commit 6b78365

Please sign in to comment.