// If you are here, it means the target size is met after adding the last batch of read history.
// We need to check if there's more history batches.
if _, isNotFound := err.(*serviceerror.NotFound); isNotFound && firstEventID != common.FirstEventID {
newIterState.FinishedIteration = true
return historyBatches, newIterState, nil