@@ -343,14 +343,16 @@ std::shared_ptr<TCleanupPortionsColumnEngineChanges> TColumnEngineForLogs::Start
343
343
ui32 skipLocked = 0 ;
344
344
ui32 portionsFromDrop = 0 ;
345
345
bool limitExceeded = false ;
346
- THashSet<TPortionAddress> uniquePortions;
347
346
for (ui64 pathId : pathsToDrop) {
348
347
auto g = GranulesStorage->GetGranuleOptional (pathId);
349
348
if (!g) {
350
349
continue ;
351
350
}
352
351
353
352
for (auto & [portion, info] : g->GetPortions ()) {
353
+ if (info->CheckForCleanup ()) {
354
+ continue ;
355
+ }
354
356
if (dataLocksManager->IsLocked (*info)) {
355
357
++skipLocked;
356
358
continue ;
@@ -361,7 +363,6 @@ std::shared_ptr<TCleanupPortionsColumnEngineChanges> TColumnEngineForLogs::Start
361
363
limitExceeded = true ;
362
364
break ;
363
365
}
364
- AFL_VERIFY (uniquePortions.emplace (info->GetAddress ()).second );
365
366
changes->PortionsToDrop .push_back (*info);
366
367
++portionsFromDrop;
367
368
}
@@ -380,16 +381,14 @@ std::shared_ptr<TCleanupPortionsColumnEngineChanges> TColumnEngineForLogs::Start
380
381
++i;
381
382
continue ;
382
383
}
383
- if (uniquePortions.emplace (it->second [i].GetAddress ()).second ) {
384
- AFL_VERIFY (it->second [i].CheckForCleanup (snapshot))(" p_snapshot" , it->second [i].GetRemoveSnapshotOptional ())(" snapshot" , snapshot);
385
- if (txSize + it->second [i].GetTxVolume () < txSizeLimit || changes->PortionsToDrop .empty ()) {
386
- txSize += it->second [i].GetTxVolume ();
387
- } else {
388
- limitExceeded = true ;
389
- break ;
390
- }
391
- changes->PortionsToDrop .push_back (std::move (it->second [i]));
384
+ AFL_VERIFY (it->second [i].CheckForCleanup (snapshot))(" p_snapshot" , it->second [i].GetRemoveSnapshotOptional ())(" snapshot" , snapshot);
385
+ if (txSize + it->second [i].GetTxVolume () < txSizeLimit || changes->PortionsToDrop .empty ()) {
386
+ txSize += it->second [i].GetTxVolume ();
387
+ } else {
388
+ limitExceeded = true ;
389
+ break ;
392
390
}
391
+ changes->PortionsToDrop .push_back (std::move (it->second [i]));
393
392
if (i + 1 < it->second .size ()) {
394
393
it->second [i] = std::move (it->second .back ());
395
394
}
0 commit comments