Skip to content

Commit 6b78365

Browse files
committed
Revert "Remove unused history event check (temporalio#3373)"
This reverts commit 5e6b2d7.
1 parent c9e8f49 commit 6b78365

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

service/history/workflow/context.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,13 +672,16 @@ func (c *ContextImpl) SetWorkflowExecution(ctx context.Context, now time.Time) (
672672
}
673673
}()
674674

675-
resetWorkflowSnapshot, _, err := c.MutableState.CloseTransactionAsSnapshot(
675+
resetWorkflowSnapshot, resetWorkflowEventsSeq, err := c.MutableState.CloseTransactionAsSnapshot(
676676
now,
677677
TransactionPolicyPassive,
678678
)
679679
if err != nil {
680680
return err
681681
}
682+
if len(resetWorkflowEventsSeq) != 0 {
683+
return serviceerror.NewInternal("SetWorkflowExecution encountered new events")
684+
}
682685

683686
resetWorkflowSnapshot.ExecutionInfo.ExecutionStats = &persistencespb.ExecutionStats{
684687
HistorySize: c.GetHistorySize(),

0 commit comments

Comments
 (0)