Skip to content

Commit

Permalink
Don't retry when reset to a middle of a batch to save perf (cadence-w…
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng authored Nov 2, 2020
1 parent 6e5f9ec commit 0727b17
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions service/history/execution/state_rebuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,14 @@ func (r *stateRebuilderImpl) Rebuild(
baseLastEventID,
baseLastEventVersion,
)) {
return nil, 0, &shared.InternalServiceError{Message: fmt.Sprintf(
"nDCStateRebuilder unable to rebuild mutable state to event ID: %v, version: %v",
return nil, 0, &shared.BadRequestError{Message: fmt.Sprintf(
"nDCStateRebuilder unable to rebuild mutable state to event ID: %v, version: %v, "+
"baseLastEventID + baseLastEventVersion is not the same as the last event of the last "+
"batch, event ID: %v, version :%v ,typicaly because of attemptting to rebuild to a middle of a batch",
baseLastEventID,
baseLastEventVersion,
lastItem.EventID,
lastItem.Version,
)}
}

Expand Down

0 comments on commit 0727b17

Please sign in to comment.