diff --git a/ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp b/ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp index 4acb4567276f..dc9974520681 100644 --- a/ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp +++ b/ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp @@ -124,12 +124,12 @@ namespace NKikimr { if (AddingTasks) { for (; it.Valid(); it.Next()) { + StartKey = it.GetCurKey().LogoBlobID(); + if (checkRestart()) { return; } - StartKey = it.GetCurKey().LogoBlobID(); - // we still have some space in recovery machine logic, so we can add new item ProcessItem(it, *barriers, allowKeepFlags); MilestoneQueue.PopIfNeeded(StartKey); @@ -147,12 +147,12 @@ namespace NKikimr { } for (; it.Valid(); it.Next()) { + StartKey = it.GetCurKey().LogoBlobID(); + if (checkRestart()) { return; } - StartKey = it.GetCurKey().LogoBlobID(); - // check the milestone queue, if we have requested blob if (MilestoneQueue.Match(StartKey, &ReplInfo->ItemsTotal, &ReplInfo->WorkUnitsTotal)) { break;