}
if historyIterator == nil { // will only be set by testing code
historyIterator = archiver.NewHistoryIterator(request, h.executionManager, targetHistoryBlobSize)
}
for historyIterator.HasNext() {
historyBlob, err := historyIterator.Next(ctx)
if err != nil {
if _, isNotFound := err.(*serviceerror.NotFound); isNotFound {
// workflow history no longer exists, may due to duplicated archival signal