Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix VDisk chunks leaking in runtime #5112

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcommit.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,10 @@ namespace NKikimr {

// notify delayed deleter when log record is actually written; we MUST ensure that updates are coming in
// order of increasing LSN's; this is achieved automatically as all actors reside on the same mailbox
if (WId) {
LevelIndex->DelayedCompactionDeleterInfo->Update(LsnSeg.Last, std::move(Metadata.RemovedHugeBlobs),
CommitRecord.DeleteToDecommitted ? CommitRecord.DeleteChunks : TVector<TChunkIdx>(),
PDiskSignatureForHullDbKey<TKey>(), WId, ctx, Ctx->HugeKeeperId, Ctx->SkeletonId, Ctx->PDiskCtx,
Ctx->HullCtx->VCtx);
} else {
Y_ABORT_UNLESS(Metadata.RemovedHugeBlobs.Empty());
}
LevelIndex->DelayedCompactionDeleterInfo->Update(LsnSeg.Last, std::move(Metadata.RemovedHugeBlobs),
CommitRecord.DeleteToDecommitted ? CommitRecord.DeleteChunks : TVector<TChunkIdx>(),
PDiskSignatureForHullDbKey<TKey>(), WId, ctx, Ctx->HugeKeeperId, Ctx->SkeletonId, Ctx->PDiskCtx,
Ctx->HullCtx->VCtx);

NPDisk::TEvLogResult* msg = ev->Get();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ namespace NKikimr {
ui64 wId, const TActorContext& ctx, const TActorId& hugeKeeperId, const TActorId& skeletonId,
const TPDiskCtxPtr& pdiskCtx, const TVDiskContextPtr& vctx) {
Y_ABORT_UNLESS(recordLsn > LastDeletionLsn);
Y_ABORT_UNLESS(!removedHugeBlobs.Empty());
LastDeletionLsn = recordLsn;
LOG_DEBUG_S(ctx, NKikimrServices::BS_HULLCOMP, vctx->VDiskLogPrefix
<< "TDelayedCompactionDeleter: Update recordLsn# " << recordLsn << " removedHugeBlobs.size# "
Expand Down Expand Up @@ -223,8 +222,12 @@ namespace NKikimr {
TReleaseQueueItem& item = ReleaseQueue.front();
if (CurrentSnapshots.empty() || (item.RecordLsn <= CurrentSnapshots.begin()->first)) {
// matching record -- commit it to huge hull keeper and throw out of the queue
ctx.Send(hugeKeeperId, new TEvHullFreeHugeSlots(std::move(item.RemovedHugeBlobs),
item.RecordLsn, item.Signature, item.WId));
if (item.WId) {
ctx.Send(hugeKeeperId, new TEvHullFreeHugeSlots(std::move(item.RemovedHugeBlobs),
item.RecordLsn, item.Signature, item.WId));
} else {
Y_ABORT_UNLESS(item.RemovedHugeBlobs.Empty());
}
if (item.ChunksToForget) {
LOG_DEBUG(ctx, NKikimrServices::BS_VDISK_CHUNKS, VDISKP(vctx->VDiskLogPrefix,
"FORGET: PDiskId# %s ChunksToForget# %s", pdiskCtx->PDiskIdString.data(),
Expand Down
Loading