diff --git a/ydb/core/tx/datashard/memory_state_migration.cpp b/ydb/core/tx/datashard/memory_state_migration.cpp index 49ea8f109ae7..4a894cf5835a 100644 --- a/ydb/core/tx/datashard/memory_state_migration.cpp +++ b/ydb/core/tx/datashard/memory_state_migration.cpp @@ -91,6 +91,9 @@ class TDataShardInMemoryRestoreActor Buffer.Insert(Buffer.End(), std::move(payload)); } + // We must not have any checkpoints in the buffer yet + Y_ENSURE(Checkpoints.empty()); + size_t lastOffset = 0; for (size_t offset : msg->Record.GetSerializedStateCheckpoints()) { // These offsets are relative to the start of the new chunk, we make @@ -208,6 +211,8 @@ class TDataShardInMemoryRestoreActor Arena.Reset(); } + Checkpoints.clear(); + if (msg->Record.HasContinuationToken()) { // Request the next data chunk // Note: we have subscribed in the first request already