Skip to content

Commit ee5ceb4

Browse files
authored
Fix VDisk premature donor drop (#15400)
1 parent 1e9aba9 commit ee5ceb4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ydb/core/blobstorage/vdisk/repl/blobstorage_repl.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ namespace NKikimr {
177177
bool UnrecoveredNonphantomBlobs = false;
178178
bool RequestedReplicationToken = false;
179179
bool HoldingReplicationToken = false;
180+
bool CanDropDonor = false;
180181

181182
TWatchdogTimer<TEvReplCheckProgress> ReplProgressWatchdog;
182183

@@ -280,6 +281,7 @@ namespace NKikimr {
280281
// switch to planning state
281282
Transition(Relaxation, Plan);
282283

284+
CanDropDonor = true;
283285
RunRepl(TLogoBlobID());
284286
}
285287

@@ -375,6 +377,8 @@ namespace NKikimr {
375377
ResetReplProgressTimer(false);
376378
}
377379

380+
CanDropDonor = CanDropDonor && info->DropDonor;
381+
378382
bool finished = false;
379383

380384
if (info->Eof) { // when it is the last quantum for some donor, rotate the blob sets
@@ -399,7 +403,7 @@ namespace NKikimr {
399403
}
400404
}
401405
if (!finished) {
402-
if (info->DropDonor) {
406+
if (CanDropDonor) {
403407
Y_ABORT_UNLESS(!DonorQueue.empty() && DonorQueue.front());
404408
DropDonor(*DonorQueue.front());
405409
DonorQueue.pop_front();

0 commit comments

Comments
 (0)