aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralexvru <alexvru@ydb.tech>2022-08-31 23:27:25 +0300
committeralexvru <alexvru@ydb.tech>2022-08-31 23:27:25 +0300
commitfc8096bf8173562afc5da58dbbb019af2ce1ee2f (patch)
tree024a7cf9a1376497a907f8f69c5dfcd2df243971
parent824aa0bc51a75b892a09253e2edbefe396e997fd (diff)
downloadydb-fc8096bf8173562afc5da58dbbb019af2ce1ee2f.tar.gz
Do not hold compaction when having active snapshots
-rw-r--r--library/cpp/neh/http2.cpp2
-rw-r--r--ydb/core/blobstorage/pdisk/blobstorage_pdisk.h12
-rw-r--r--ydb/core/blobstorage/pdisk/mock/pdisk_mock.cpp38
-rw-r--r--ydb/core/blobstorage/vdisk/common/vdisk_mon.h4
-rw-r--r--ydb/core/blobstorage/vdisk/huge/CMakeLists.txt1
-rw-r--r--ydb/core/blobstorage/vdisk/hulldb/generic/hulldb_events.h14
-rw-r--r--ydb/core/blobstorage/vdisk/hulldb/generic/hullds_idx.h8
-rw-r--r--ydb/core/blobstorage/vdisk/hulldb/generic/hullds_idxsnap.h6
-rw-r--r--ydb/core/blobstorage/vdisk/hulldb/generic/hullds_sstslice.h24
-rw-r--r--ydb/core/blobstorage/vdisk/hulldb/hulldb_recovery.cpp2
-rw-r--r--ydb/core/blobstorage/vdisk/hullop/CMakeLists.txt1
-rw-r--r--ydb/core/blobstorage/vdisk/hullop/blobstorage_hull.cpp6
-rw-r--r--ydb/core/blobstorage/vdisk/hullop/blobstorage_hullactor.cpp24
-rw-r--r--ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcommit.h88
-rw-r--r--ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcompdelete.cpp (renamed from ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugedelete.cpp)24
-rw-r--r--ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcompdelete.h (renamed from ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugedelete.h)76
-rw-r--r--ydb/core/blobstorage/vdisk/skeleton/blobstorage_monactors.cpp8
-rw-r--r--ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp10
18 files changed, 164 insertions, 184 deletions
diff --git a/library/cpp/neh/http2.cpp b/library/cpp/neh/http2.cpp
index 83e8db0980..fb8b08fd81 100644
--- a/library/cpp/neh/http2.cpp
+++ b/library/cpp/neh/http2.cpp
@@ -24,6 +24,7 @@
#include <util/thread/factory.h>
#include <util/thread/singleton.h>
#include <util/system/sanitizers.h>
+#include <util/system/thread.h>
#include <atomic>
@@ -1042,6 +1043,7 @@ namespace {
}
void DoExecute() override {
+ TThread::SetCurrentThreadName("NehHttpConnMngr");
while (true) {
{
TGuard<TMutex> g(PurgeMutex_);
diff --git a/ydb/core/blobstorage/pdisk/blobstorage_pdisk.h b/ydb/core/blobstorage/pdisk/blobstorage_pdisk.h
index b7ae8cc7a9..44edf4be99 100644
--- a/ydb/core/blobstorage/pdisk/blobstorage_pdisk.h
+++ b/ydb/core/blobstorage/pdisk/blobstorage_pdisk.h
@@ -22,19 +22,13 @@ IActor* CreatePDisk(const TIntrusivePtr<TPDiskConfig> &cfg, const NPDisk::TKey &
namespace NPDisk {
struct TCommitRecord {
- ui64 FirstLsnToKeep; // 0 == not set
+ ui64 FirstLsnToKeep = 0; // 0 == not set
TVector<TChunkIdx> CommitChunks;
TVector<TChunkIdx> DeleteChunks;
- bool IsStartingPoint;
- bool DeleteToDecommitted; // 1 == set chunks to Decommitted state that requires a ChunkForget event or a restart
+ bool IsStartingPoint = false;
+ bool DeleteToDecommitted = false; // 1 == set chunks to Decommitted state that requires a ChunkForget event or a restart
// the value of DeleteToDecommitted is not stored as a part of the commit record.
- TCommitRecord()
- : FirstLsnToKeep(0)
- , IsStartingPoint(false)
- , DeleteToDecommitted(false)
- {}
-
void ValidateChunks(TVector<TChunkIdx> &chunks) {
if (chunks.size()) {
Sort(chunks.begin(), chunks.end());
diff --git a/ydb/core/blobstorage/pdisk/mock/pdisk_mock.cpp b/ydb/core/blobstorage/pdisk/mock/pdisk_mock.cpp
index 86cc23e1e9..fffc095ae7 100644
--- a/ydb/core/blobstorage/pdisk/mock/pdisk_mock.cpp
+++ b/ydb/core/blobstorage/pdisk/mock/pdisk_mock.cpp
@@ -152,6 +152,15 @@ struct TPDiskMockState::TImpl {
AdjustFreeChunks();
}
+ void UncommitChunk(TOwner& owner, TChunkIdx chunkIdx) {
+ if (owner.ReservedChunks.contains(chunkIdx)) {
+ } else if (owner.CommittedChunks.erase(chunkIdx)) {
+ owner.ReservedChunks.insert(chunkIdx);
+ } else {
+ Y_FAIL();
+ }
+ }
+
void SetCorruptedArea(ui32 chunkIdx, ui32 begin, ui32 end, bool enabled) {
const ui64 chunkBegin = ui64(chunkIdx) * ChunkSize;
const ui64 diskBegin = chunkBegin + begin;
@@ -445,7 +454,11 @@ public:
Impl.CommitChunk(owner, chunk);
}
for (const TChunkIdx chunk : cr.DeleteChunks) {
- Impl.DeleteChunk(owner, chunk);
+ if (cr.DeleteToDecommitted) {
+ Impl.UncommitChunk(owner, chunk);
+ } else {
+ Impl.DeleteChunk(owner, chunk);
+ }
}
isStartingPoint = cr.IsStartingPoint;
}
@@ -486,6 +499,28 @@ public:
}
}
+ void Handle(NPDisk::TEvChunkForget::TPtr ev) {
+ auto *msg = ev->Get();
+ NKikimrProto::EReplyStatus status = NKikimrProto::OK;
+ TString errorReason;
+ if (const auto it = Impl.Owners.find(msg->Owner); it == Impl.Owners.end()) {
+ Y_FAIL("invalid Owner");
+ } else if (it->second.Slain) {
+ status = NKikimrProto::INVALID_OWNER;
+ errorReason = "VDisk is slain";
+ } else if (msg->OwnerRound != it->second.OwnerRound) {
+ status = NKikimrProto::INVALID_ROUND;
+ errorReason = "invalid OwnerRound";
+ } else {
+ TImpl::TOwner& owner = it->second;
+ PDISK_MOCK_LOG(DEBUG, PDMxx, "received TEvChunkForget", (Msg, msg->ToString()), (VDiskId, owner.VDiskId));
+ for (const TChunkIdx chunkIdx : msg->ForgetChunks) {
+ Impl.DeleteChunk(owner, chunkIdx);
+ }
+ }
+ Send(ev->Sender, new NPDisk::TEvChunkForgetResult(status, {}, errorReason), 0, ev->Cookie);
+ }
+
void Handle(NPDisk::TEvReadLog::TPtr ev) {
auto *msg = ev->Get();
auto res = std::make_unique<NPDisk::TEvReadLogResult>(NKikimrProto::OK, msg->Position, msg->Position,
@@ -677,6 +712,7 @@ public:
STRICT_STFUNC(StateFunc,
hFunc(NPDisk::TEvYardInit, Handle);
hFunc(NPDisk::TEvLog, Handle);
+ hFunc(NPDisk::TEvChunkForget, Handle);
hFunc(NPDisk::TEvMultiLog, Handle);
cFunc(EvResume, HandleLogQ);
hFunc(NPDisk::TEvReadLog, Handle);
diff --git a/ydb/core/blobstorage/vdisk/common/vdisk_mon.h b/ydb/core/blobstorage/vdisk/common/vdisk_mon.h
index ca1212b409..2c091a6c2f 100644
--- a/ydb/core/blobstorage/vdisk/common/vdisk_mon.h
+++ b/ydb/core/blobstorage/vdisk/common/vdisk_mon.h
@@ -22,7 +22,7 @@ namespace NKikimr {
DskSpaceTrackerId = 9,
LocalRecovInfoId = 10,
AnubisRunnerId = 11,
- DelayedHugeBlobDeleterId = 12,
+ DelayedCompactionDeleterId = 12,
ScrubId = 13,
DbMainPageLogoBlobs = 14,
DbMainPageBlocks = 15,
@@ -42,7 +42,7 @@ namespace NKikimr {
case HugeKeeperId: return "HugeKeeperId";
case DskSpaceTrackerId: return "DskSpaceTrackerId";
case LocalRecovInfoId: return "LocalRecovInfoId";
- case DelayedHugeBlobDeleterId: return "DelayedHugeBlobDeleterId";
+ case DelayedCompactionDeleterId: return "DelayedCompactionDeleterId";
case ScrubId: return "ScrubId";
case DbMainPageLogoBlobs: return "DbMainPageLogoBlobs";
case DbMainPageBlocks: return "DbMainPageBlocks";
diff --git a/ydb/core/blobstorage/vdisk/huge/CMakeLists.txt b/ydb/core/blobstorage/vdisk/huge/CMakeLists.txt
index 14e856722f..0bee7341db 100644
--- a/ydb/core/blobstorage/vdisk/huge/CMakeLists.txt
+++ b/ydb/core/blobstorage/vdisk/huge/CMakeLists.txt
@@ -19,7 +19,6 @@ target_link_libraries(blobstorage-vdisk-huge PUBLIC
target_sources(blobstorage-vdisk-huge PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhuge.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugedefs.cpp
- ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugedelete.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugeheap.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugerecovery.cpp
)
diff --git a/ydb/core/blobstorage/vdisk/hulldb/generic/hulldb_events.h b/ydb/core/blobstorage/vdisk/hulldb/generic/hulldb_events.h
deleted file mode 100644
index 626a05f69e..0000000000
--- a/ydb/core/blobstorage/vdisk/hulldb/generic/hulldb_events.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-
-#include "defs.h"
-
-namespace NKikimr {
-
- ////////////////////////////////////////////////////////////////////////////
- // THullFreeSlice
- ////////////////////////////////////////////////////////////////////////////
- struct THullFreeSlice : public TEventLocal<THullFreeSlice, TEvBlobStorage::EvHullFreeSlice> {
- };
-
-} // NKikimr
-
diff --git a/ydb/core/blobstorage/vdisk/hulldb/generic/hullds_idx.h b/ydb/core/blobstorage/vdisk/hulldb/generic/hullds_idx.h
index 390fdea6d1..cb647db1bd 100644
--- a/ydb/core/blobstorage/vdisk/hulldb/generic/hullds_idx.h
+++ b/ydb/core/blobstorage/vdisk/hulldb/generic/hullds_idx.h
@@ -187,7 +187,7 @@ namespace NKikimr {
TAtomic HullCompReadsInFlight = 0;
TAtomic HullCompWritesInFlight = 0;
- TIntrusivePtr<TDelayedHugeBlobDeleterInfo> DelayedHugeBlobDeleterInfo;
+ TIntrusivePtr<TDelayedCompactionDeleterInfo> DelayedCompactionDeleterInfo;
std::shared_ptr<TLevelIndexActorCtx> ActorCtx;
private:
@@ -205,7 +205,7 @@ namespace NKikimr {
TLevelIndexSnapshot PrivateGetSnapshot(TActorSystem *actorSystemToNotifyLevelIndex) {
Y_VERIFY_DEBUG(Loaded);
return TLevelIndexSnapshot(CurSlice, Fresh.GetSnapshot(), CurSlice->Level0CurSstsNum(),
- actorSystemToNotifyLevelIndex, DelayedHugeBlobDeleterInfo);
+ actorSystemToNotifyLevelIndex, DelayedCompactionDeleterInfo);
}
public:
@@ -230,7 +230,7 @@ namespace NKikimr {
, Ctx(std::make_shared<TLevelIndexCtx>())
, Fresh(settings, TAppData::TimeProvider, std::move(arena))
, CurSlice(MakeIntrusive<TLevelSlice>(settings, Ctx))
- , DelayedHugeBlobDeleterInfo(new TDelayedHugeBlobDeleterInfo)
+ , DelayedCompactionDeleterInfo(new TDelayedCompactionDeleterInfo)
, ActorCtx(std::make_shared<TLevelIndexActorCtx>())
, CompactedLsn()
{}
@@ -244,7 +244,7 @@ namespace NKikimr {
, Fresh(settings, TAppData::TimeProvider, std::move(arena))
, CurSlice(MakeIntrusive<TLevelSlice>(settings, Ctx, pb))
, CurEntryPointLsn(entryPointLsn)
- , DelayedHugeBlobDeleterInfo(new TDelayedHugeBlobDeleterInfo)
+ , DelayedCompactionDeleterInfo(new TDelayedCompactionDeleterInfo)
, ActorCtx(std::make_shared<TLevelIndexActorCtx>())
, NextSstId(pb.GetNextSstId())
, CompactedLsn(pb)
diff --git a/ydb/core/blobstorage/vdisk/hulldb/generic/hullds_idxsnap.h b/ydb/core/blobstorage/vdisk/hulldb/generic/hullds_idxsnap.h
index a32c54ae88..fb4c3d195c 100644
--- a/ydb/core/blobstorage/vdisk/hulldb/generic/hullds_idxsnap.h
+++ b/ydb/core/blobstorage/vdisk/hulldb/generic/hullds_idxsnap.h
@@ -28,11 +28,11 @@ namespace NKikimr {
// TLevelIndexSnapshot is created via TLevelIndex::GetSnapshot
TLevelIndexSnapshot(const TLevelSlicePtr &slice, TFreshDataSnapshot &&freshSnap, ui32 level0SegsNum,
- TActorSystem *actorSystem, TIntrusivePtr<TDelayedHugeBlobDeleterInfo> deleterInfo)
+ TActorSystem *actorSystem, TIntrusivePtr<TDelayedCompactionDeleterInfo> deleterInfo)
: SliceSnap(slice, level0SegsNum)
, FreshSnap(std::move(freshSnap))
, Notifier(actorSystem
- ? new TDelayedHugeBlobDeleterNotifier(actorSystem, std::move(deleterInfo))
+ ? new TDelayedCompactionDeleterNotifier(actorSystem, std::move(deleterInfo))
: nullptr)
{}
@@ -60,7 +60,7 @@ namespace NKikimr {
TFreshDataSnapshot FreshSnap;
private:
- TIntrusivePtr<TDelayedHugeBlobDeleterNotifier> Notifier;
+ TIntrusivePtr<TDelayedCompactionDeleterNotifier> Notifier;
};
extern template class TLevelIndexSnapshot<TKeyLogoBlob, TMemRecLogoBlob>;
diff --git a/ydb/core/blobstorage/vdisk/hulldb/generic/hullds_sstslice.h b/ydb/core/blobstorage/vdisk/hulldb/generic/hullds_sstslice.h
index 0cb584169e..af58cb886e 100644
--- a/ydb/core/blobstorage/vdisk/hulldb/generic/hullds_sstslice.h
+++ b/ydb/core/blobstorage/vdisk/hulldb/generic/hullds_sstslice.h
@@ -3,11 +3,9 @@
#include "defs.h"
#include <ydb/core/blobstorage/vdisk/hulldb/fresh/fresh_data.h>
#include "hullds_sstvec.h"
-// FIXME: don't depend on hulldb* (i.e. ActorSystem, events, actors)
-#include "hulldb_events.h"
#include <ydb/core/blobstorage/vdisk/hulldb/hulldb_bulksstmngr.h>
-#include <ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugedelete.h>
+#include <ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcompdelete.h>
namespace NKikimr {
@@ -191,9 +189,6 @@ namespace NKikimr {
TSortedLevels SortedLevels;
std::shared_ptr<TLevelIndexCtx> Ctx;
- // when slice is destroyed we notify CommitterId about this event (i.e. ChunksToDelete are not used anymore)
- TActorSystem * /*const*/ ActorSystem;
- TActorId CommitterId;
// In ChunksToDelete we store chunks that are old and subject for deletion,
// but previous snapshot can still use them
TVector<ui32> ChunksToDelete;
@@ -208,8 +203,6 @@ namespace NKikimr {
: Level0(settings, ctx)
, SortedLevels()
, Ctx(ctx)
- , ActorSystem(nullptr)
- , CommitterId()
, ChunksToDelete()
, BulkFormedSegments()
{}
@@ -220,8 +213,6 @@ namespace NKikimr {
: Level0(settings, ctx, pb.GetLevel0())
, SortedLevels()
, Ctx(ctx)
- , ActorSystem(nullptr)
- , CommitterId()
, ChunksToDelete()
, BulkFormedSegments(pb.GetBulkFormedSstInfoSet())
{
@@ -239,17 +230,8 @@ namespace NKikimr {
}
}
- ~TLevelSlice() {
- if (ActorSystem) {
- Y_VERIFY_DEBUG(ChunksToDelete.empty());
- ActorSystem->Send(CommitterId, new THullFreeSlice());
- }
- }
-
- void SetUpCommitter(TActorSystem * /*const*/ system, const TActorId &id) {
- ActorSystem = system;
- CommitterId = id;
- }
+ ~TLevelSlice()
+ {}
void SerializeToProto(NKikimrVDiskData::TLevelIndex &pb) const {
// write chunks to delete
diff --git a/ydb/core/blobstorage/vdisk/hulldb/hulldb_recovery.cpp b/ydb/core/blobstorage/vdisk/hulldb/hulldb_recovery.cpp
index a6437b26d3..e9676333df 100644
--- a/ydb/core/blobstorage/vdisk/hulldb/hulldb_recovery.cpp
+++ b/ydb/core/blobstorage/vdisk/hulldb/hulldb_recovery.cpp
@@ -438,7 +438,7 @@ namespace NKikimr {
void THullDbRecovery::OutputHtmlForHugeBlobDeleter(IOutputStream &str) const
{
if (HullDs && HullDs->LogoBlobs) {
- HullDs->LogoBlobs->DelayedHugeBlobDeleterInfo->RenderState(str);
+ HullDs->LogoBlobs->DelayedCompactionDeleterInfo->RenderState(str);
}
}
diff --git a/ydb/core/blobstorage/vdisk/hullop/CMakeLists.txt b/ydb/core/blobstorage/vdisk/hullop/CMakeLists.txt
index a3d531b843..c6c175c7e1 100644
--- a/ydb/core/blobstorage/vdisk/hullop/CMakeLists.txt
+++ b/ydb/core/blobstorage/vdisk/hullop/CMakeLists.txt
@@ -19,6 +19,7 @@ target_link_libraries(blobstorage-vdisk-hullop PUBLIC
target_sources(blobstorage-vdisk-hullop PRIVATE
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/vdisk/hullop/blobstorage_hull.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullactor.cpp
+ ${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcompdelete.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/vdisk/hullop/blobstorage_hulllog.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/vdisk/hullop/blobstorage_hulllogcutternotify.cpp
${CMAKE_SOURCE_DIR}/ydb/core/blobstorage/vdisk/hullop/hullop_compactfreshappendix.cpp
diff --git a/ydb/core/blobstorage/vdisk/hullop/blobstorage_hull.cpp b/ydb/core/blobstorage/vdisk/hullop/blobstorage_hull.cpp
index 714d0e322a..a69d627727 100644
--- a/ydb/core/blobstorage/vdisk/hullop/blobstorage_hull.cpp
+++ b/ydb/core/blobstorage/vdisk/hullop/blobstorage_hull.cpp
@@ -133,9 +133,9 @@ namespace NKikimr {
// create delayed huge blob deleter actor only for LogoBlobs level index as huge blobs are only possible
// for that data
- auto& deleterInfo = HullDs->LogoBlobs->DelayedHugeBlobDeleterInfo;
- auto hugeBlobDeleterAid = ctx.RegisterWithSameMailbox(CreateDelayedHugeBlobDeleterActor(hullLogCtx->HugeKeeperId,
- deleterInfo));
+ auto& deleterInfo = HullDs->LogoBlobs->DelayedCompactionDeleterInfo;
+ auto hugeBlobDeleterAid = ctx.RegisterWithSameMailbox(CreateDelayedCompactionDeleterActor(hullLogCtx->HugeKeeperId,
+ hullLogCtx->SkeletonId, hullLogCtx->PDiskCtx, deleterInfo));
deleterInfo->SetActorId(hugeBlobDeleterAid);
activeActors.Insert(hugeBlobDeleterAid);
diff --git a/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullactor.cpp b/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullactor.cpp
index e0118b3acf..31f2fe4797 100644
--- a/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullactor.cpp
+++ b/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullactor.cpp
@@ -4,7 +4,7 @@
#include "blobstorage_buildslice.h"
#include "hullop_compactfreshappendix.h"
#include <ydb/core/blobstorage/vdisk/hulldb/compstrat/hulldb_compstrat_selector.h>
-#include <ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugedelete.h>
+#include <ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcompdelete.h>
#include <ydb/core/blobstorage/vdisk/hulldb/hulldb_bulksst_add.h>
namespace NKikimr {
@@ -363,24 +363,17 @@ namespace NKikimr {
LogRemovedHugeBlobs(ctx, CompactionTask->GetHugeBlobsToDelete(), true);
}
- // this flag is set if there are other users of this slice
- bool prevSliceActive = prevSlice.RefCount() != 1;
-
// delete list, includes previous ChunksToDelete and reserved chunks
TVector<ui32> deleteChunks(std::move(prevSlice->ChunksToDelete));
deleteChunks.insert(deleteChunks.end(), reservedChunksLeft.begin(), reservedChunksLeft.end());
- // select the vector where to put freed chunks to; if we have an active snapshot, then we preserve chunks and
- // put them to ChunksToDelete in order to remove them at next commit; otherwise we can delete them immediately
- TVector<ui32>& freedChunksSink = prevSliceActive ? RTCtx->LevelIndex->CurSlice->ChunksToDelete : deleteChunks;
-
// only delete chunks if we actually delete SST's from yard; otherwise it is move operation, we delete them from one
// level and put to another
if (CompactionTask->CollectDeletedSsts()) {
TLeveledSstsIterator delIt(&CompactionTask->GetSstsToDelete());
for (delIt.SeekToFirst(); delIt.Valid(); delIt.Next()) {
const TLevelSegment& seg = *delIt.Get().SstPtr;
- seg.FillInChunkIds(freedChunksSink);
+ seg.FillInChunkIds(deleteChunks);
if (seg.Info.IsCreatedByRepl()) { // mark it out-of-index to schedule deletion from the bulk formed segments table
prevSlice->BulkFormedSegments.RemoveSstFromIndex(seg.GetEntryPoint());
}
@@ -394,7 +387,7 @@ namespace NKikimr {
// apply compaction to bulk-formed SSTables; it produces a set of bulk-formed segments suitable for saving
// in new slice containing only needed entries
- prevSlice->BulkFormedSegments.ApplyCompactionResult(RTCtx->LevelIndex->CurSlice->BulkFormedSegments, freedChunksSink);
+ prevSlice->BulkFormedSegments.ApplyCompactionResult(RTCtx->LevelIndex->CurSlice->BulkFormedSegments, deleteChunks);
// manage recovery log LSN to keep:
// we can't advance LsnToKeep until the prev snapshot dies,
@@ -404,16 +397,10 @@ namespace NKikimr {
// run level committer
TDiskPartVec removedHugeBlobs(CompactionTask->ExtractHugeBlobsToDelete());
auto committer = std::make_unique<TAsyncLevelCommitter>(HullLogCtx, HullDbCommitterCtx, RTCtx->LevelIndex,
- ctx.SelfID, std::move(chunksAdded), std::move(deleteChunks), std::move(removedHugeBlobs),
- prevSliceActive);
+ ctx.SelfID, std::move(chunksAdded), std::move(deleteChunks), std::move(removedHugeBlobs));
TActorId committerID = ctx.RegisterWithSameMailbox(committer.release());
ActiveActors.Insert(committerID);
- if (prevSliceActive) {
- // notify LIActor when previous slice is not used anymore
- prevSlice->SetUpCommitter(ctx.ExecutorThread.ActorSystem, committerID);
- }
-
// drop prev slice, some snapshot can still have a pointer to it
prevSlice.Drop();
@@ -673,7 +660,8 @@ namespace NKikimr {
HullDs->HullCtx,
RTCtx->LsnMngr,
loggerId,
- HullLogCtx->HugeKeeperId))
+ HullLogCtx->HugeKeeperId,
+ RTCtx->SkeletonId))
, CompactionTask(new TCompactionTask)
, ActiveActors(RTCtx->LevelIndex->ActorCtx->ActiveActors)
, LevelStat(HullDs->HullCtx->VCtx->VDiskCounters)
diff --git a/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcommit.h b/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcommit.h
index 8b094e893b..f9c7696253 100644
--- a/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcommit.h
+++ b/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcommit.h
@@ -3,7 +3,6 @@
#include "blobstorage_hulllog.h"
#include "hullop_entryserialize.h"
#include <ydb/core/blobstorage/vdisk/common/vdisk_private_events.h>
-#include <ydb/core/blobstorage/vdisk/hulldb/generic/hulldb_events.h>
#include <ydb/core/blobstorage/vdisk/hulldb/generic/hullds_idx.h>
#include <ydb/core/blobstorage/vdisk/hulldb/hulldb_bulksst_add.h>
#include <ydb/core/blobstorage/vdisk/synclog/blobstorage_synclog_public_events.h>
@@ -21,20 +20,23 @@ namespace NKikimr {
TIntrusivePtr<TLsnMngr> LsnMngr;
const TActorId LoggerId;
const TActorId HugeKeeperId;
+ const TActorId SkeletonId;
THullDbCommitterCtx(
TPDiskCtxPtr pdiskCtx,
THullCtxPtr hullCtx,
TIntrusivePtr<TLsnMngr> lsnMngr,
- const TActorId &loggerId,
- const TActorId hugeKeeperId)
+ const TActorId loggerId,
+ const TActorId hugeKeeperId,
+ const TActorId skeletonId)
: PDiskCtx(std::move(pdiskCtx))
, HullCtx(std::move(hullCtx))
, LsnMngr(std::move(lsnMngr))
, LoggerId(loggerId)
, HugeKeeperId(hugeKeeperId)
+ , SkeletonId(skeletonId)
{
- Y_VERIFY(PDiskCtx && HullCtx && LsnMngr && LoggerId && HugeKeeperId);
+ Y_VERIFY(PDiskCtx && HullCtx && LsnMngr && LoggerId && HugeKeeperId && SkeletonId);
}
};
@@ -62,15 +64,18 @@ namespace NKikimr {
TDiskPartVec RemovedHugeBlobs; // freed huge blobs
TLevelSegmentPtr ReplSst; // pointer to replicated SST
ui32 NumRecoveredBlobs; // number of blobs in this SST (valid only for replicated tables)
+ bool DeleteToDecommitted;
// constructor for ordinary committer (advance, fresh, level)
THullCommitMeta(TVector<ui32>&& chunksAdded,
TVector<ui32>&& chunksDeleted,
- TDiskPartVec&& removedHugeBlobs)
+ TDiskPartVec&& removedHugeBlobs,
+ bool prevSliceActive)
: CommitChunks(std::move(chunksAdded))
, DeleteChunks(std::move(chunksDeleted))
, RemovedHugeBlobs(std::move(removedHugeBlobs))
, NumRecoveredBlobs(0)
+ , DeleteToDecommitted(prevSliceActive)
{}
// constructor for repl sst committer
@@ -82,6 +87,7 @@ namespace NKikimr {
, DeleteChunks(std::move(chunksDeleted))
, ReplSst(std::move(replSst))
, NumRecoveredBlobs(numRecoveredBlobs)
+ , DeleteToDecommitted(false)
{}
};
@@ -131,13 +137,14 @@ 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
- LevelIndex->DelayedHugeBlobDeleterInfo->Update(LsnSeg.Last, std::move(Metadata.RemovedHugeBlobs),
- ctx, Ctx->HugeKeeperId, PDiskSignatureForHullDbKey<TKey>());
+ LevelIndex->DelayedCompactionDeleterInfo->Update(LsnSeg.Last, std::move(Metadata.RemovedHugeBlobs),
+ CommitRecord.DeleteToDecommitted ? CommitRecord.DeleteChunks : TVector<TChunkIdx>(),
+ PDiskSignatureForHullDbKey<TKey>(), ctx, Ctx->HugeKeeperId, Ctx->SkeletonId, Ctx->PDiskCtx);
NPDisk::TEvLogResult* msg = ev->Get();
// notify descendants about successful commit
- bool finished = OnLogResult(msg);
+ OnLogResult(msg);
// update current entry point for desired level index
const auto& results = msg->Results;
@@ -153,8 +160,7 @@ namespace NKikimr {
// advance LSN
LevelIndex->CurEntryPointLsn = LsnSeg.Last;
- if (finished)
- Finish(ctx);
+ Finish(ctx);
}
void Finish(const TActorContext& ctx) {
@@ -222,6 +228,7 @@ namespace NKikimr {
CommitRecord.IsStartingPoint = true;
CommitRecord.CommitChunks = std::move(Metadata.CommitChunks);
CommitRecord.DeleteChunks = std::move(Metadata.DeleteChunks);
+ CommitRecord.DeleteToDecommitted = Metadata.DeleteToDecommitted;
// validate its contents
VerifyCommitRecord(CommitRecord);
@@ -256,9 +263,7 @@ namespace NKikimr {
}
}
- virtual bool OnLogResult(NPDisk::TEvLogResult* /*msg*/) {
- return true;
- }
+ virtual void OnLogResult(NPDisk::TEvLogResult* /*msg*/) {}
void HandlePoison(TEvents::TEvPoisonPill::TPtr &ev, const TActorContext &ctx) {
Y_UNUSED(ev);
@@ -312,7 +317,7 @@ namespace NKikimr {
std::move(levelIndex),
notifyID,
TActorId(),
- typename TBase::THullCommitMeta(TVector<ui32>(), TVector<ui32>(), TDiskPartVec()),
+ {TVector<ui32>(), TVector<ui32>(), TDiskPartVec(), false},
callerInfo)
{}
};
@@ -326,9 +331,8 @@ namespace NKikimr {
{
using TBase = TBaseHullDbCommitter<TKey, TMemRec, THullCommitFinished::CommitFresh, NKikimrServices::TActivity::BS_ASYNC_FRESH_COMMITTER>;
- bool OnLogResult(NPDisk::TEvLogResult* /*msg*/) override {
+ void OnLogResult(NPDisk::TEvLogResult* /*msg*/) override {
TBase::LevelIndex->FreshCompactionFinished();
- return true;
}
public:
@@ -346,9 +350,7 @@ namespace NKikimr {
std::move(levelIndex),
notifyID,
TActorId(),
- typename TBase::THullCommitMeta(std::move(chunksAdded),
- std::move(chunksDeleted),
- std::move(removedHugeBlobs)),
+ {std::move(chunksAdded), std::move(chunksDeleted), std::move(removedHugeBlobs), false},
callerInfo)
{}
};
@@ -357,44 +359,12 @@ namespace NKikimr {
// TAsyncLevelCommitter
////////////////////////////////////////////////////////////////////////////
- // this committer as well as committing log event and waiting for result
- // optionally waits for some slice to destroy, that is stopping using
- // ChunksToDelete from hull actor; it happens when we have active snapshot
- // while doing this commit, notification comes through THullFreeSlice
- // message
-
template <class TKey, class TMemRec>
class TAsyncLevelCommitter
: public TBaseHullDbCommitter<TKey, TMemRec, THullCommitFinished::CommitLevel, NKikimrServices::TActivity::BS_ASYNC_LEVEL_COMMITTER>
{
using TBase = TBaseHullDbCommitter<TKey, TMemRec, THullCommitFinished::CommitLevel, NKikimrServices::TActivity::BS_ASYNC_LEVEL_COMMITTER>;
- bool PrevSnapshotReleased;
- bool LogCommitted;
-
- bool Done() const {
- return PrevSnapshotReleased && LogCommitted;
- }
-
- void Handle(THullFreeSlice::TPtr& /*ev*/, const TActorContext& ctx) {
- PrevSnapshotReleased = true;
- if (Done())
- TBase::Finish(ctx);
- }
-
- STFUNC(StateFunc) override {
- switch (ev->GetTypeRewrite()) {
- HFunc(THullFreeSlice, Handle);
- default:
- return TBase::StateFunc(ev, ctx);
- }
- }
-
- bool OnLogResult(NPDisk::TEvLogResult* /*msg*/) override {
- LogCommitted = true;
- return Done();
- }
-
public:
TAsyncLevelCommitter(
std::shared_ptr<THullLogCtx> hullLogCtx,
@@ -403,19 +373,14 @@ namespace NKikimr {
const TActorId& notifyID,
TVector<ui32>&& chunksAdded,
TVector<ui32>&& chunksDeleted,
- TDiskPartVec&& removedHugeBlobs,
- bool waitForHullFreeSlice)
+ TDiskPartVec&& removedHugeBlobs)
: TBase(std::move(hullLogCtx),
std::move(ctx),
std::move(levelIndex),
notifyID,
TActorId(),
- typename TBase::THullCommitMeta(std::move(chunksAdded),
- std::move(chunksDeleted),
- std::move(removedHugeBlobs)),
+ {std::move(chunksAdded), std::move(chunksDeleted), std::move(removedHugeBlobs), true},
TString())
- , PrevSnapshotReleased(!waitForHullFreeSlice)
- , LogCommitted(false)
{}
};
@@ -430,10 +395,6 @@ namespace NKikimr {
using TBase = TBaseHullDbCommitter<TKey, TMemRec, THullCommitFinished::CommitReplSst, NKikimrServices::TActivity::BS_ASYNC_REPLSST_COMMITTER>;
using TLevelSegment = NKikimr::TLevelSegment<TKey, TMemRec>;
- bool OnLogResult(NPDisk::TEvLogResult* /*msg*/) override {
- return true;
- }
-
public:
TAsyncReplSstCommitter(
std::shared_ptr<THullLogCtx> hullLogCtx,
@@ -450,8 +411,7 @@ namespace NKikimr {
std::move(levelIndex),
notifyID,
secondNotifyID,
- typename TBase::THullCommitMeta(std::move(chunksAdded), std::move(chunksDeleted), std::move(replSst),
- numRecoveredBlobs),
+ {std::move(chunksAdded), std::move(chunksDeleted), std::move(replSst), numRecoveredBlobs},
TString())
{}
};
diff --git a/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugedelete.cpp b/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcompdelete.cpp
index 3c5e904a27..45bced4c29 100644
--- a/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugedelete.cpp
+++ b/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcompdelete.cpp
@@ -1,28 +1,32 @@
-#include "blobstorage_hullhugedelete.h"
+#include "blobstorage_hullcompdelete.h"
namespace NKikimr {
- class TDelayedHugeBlobDeleterActor : public TActor<TDelayedHugeBlobDeleterActor> {
+ class TDelayedCompactionDeleterActor : public TActor<TDelayedCompactionDeleterActor> {
// pointer to database general data; actually we need only HugeKeeperID from that data
const TActorId HugeKeeperId;
+ const TActorId SkeletonId;
+ const TPDiskCtxPtr PDiskCtx;
// pointer to shared deleter state, it is primarily created in TLevelIndex
- const TIntrusivePtr<TDelayedHugeBlobDeleterInfo> Info;
+ const TIntrusivePtr<TDelayedCompactionDeleterInfo> Info;
public:
static constexpr auto ActorActivityType() {
return NKikimrServices::TActivity::BS_DELAYED_HUGE_BLOB_DELETER;
}
- TDelayedHugeBlobDeleterActor(const TActorId &hugeKeeperId,
- TIntrusivePtr<TDelayedHugeBlobDeleterInfo> info)
- : TActor(&TDelayedHugeBlobDeleterActor::StateFunc)
+ TDelayedCompactionDeleterActor(const TActorId hugeKeeperId, const TActorId skeletonId, TPDiskCtxPtr pdiskCtx,
+ TIntrusivePtr<TDelayedCompactionDeleterInfo> info)
+ : TActor(&TDelayedCompactionDeleterActor::StateFunc)
, HugeKeeperId(hugeKeeperId)
+ , SkeletonId(skeletonId)
+ , PDiskCtx(pdiskCtx)
, Info(std::move(info))
{}
void Handle(TEvHullReleaseSnapshot::TPtr& ev, const TActorContext& ctx) {
- Info->ReleaseSnapshot(ev->Get()->Cookie, ctx, HugeKeeperId);
+ Info->ReleaseSnapshot(ev->Get()->Cookie, ctx, HugeKeeperId, SkeletonId, PDiskCtx);
}
void HandlePoison(TEvents::TEvPoisonPill::TPtr &ev, const TActorContext &ctx) {
@@ -36,9 +40,9 @@ namespace NKikimr {
)
};
- IActor *CreateDelayedHugeBlobDeleterActor(const TActorId &hugeKeeperId,
- TIntrusivePtr<TDelayedHugeBlobDeleterInfo> info) {
- return new TDelayedHugeBlobDeleterActor(hugeKeeperId, std::move(info));
+ IActor *CreateDelayedCompactionDeleterActor(const TActorId hugeKeeperId, const TActorId skeletonId,
+ TPDiskCtxPtr pdiskCtx, TIntrusivePtr<TDelayedCompactionDeleterInfo> info) {
+ return new TDelayedCompactionDeleterActor(hugeKeeperId, skeletonId, std::move(pdiskCtx), std::move(info));
}
} // NKikimr
diff --git a/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugedelete.h b/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcompdelete.h
index f0f6ebc326..22a4a108d9 100644
--- a/ydb/core/blobstorage/vdisk/huge/blobstorage_hullhugedelete.h
+++ b/ydb/core/blobstorage/vdisk/hullop/blobstorage_hullcompdelete.h
@@ -1,8 +1,8 @@
#pragma once
#include "defs.h"
-#include "blobstorage_hullhuge.h"
+#include <ydb/core/blobstorage/vdisk/huge/blobstorage_hullhuge.h>
#include <library/cpp/monlib/service/pages/templates.h>
#include <ydb/core/base/blobstorage.h>
@@ -38,7 +38,7 @@ namespace NKikimr {
// LevelIndex-wide state of taken snapshots; contains shared data between corresponding actor and LevelIndex; when
// snapshot is taken, it is stored here; when it is released, a message is sent to deletion actor and the action is
// taken
- class TDelayedHugeBlobDeleterInfo : public TThrRefBase {
+ class TDelayedCompactionDeleterInfo : public TThrRefBase {
// map <LastDeletionLsn> -> <number of snapshots that were taken during the time LastDeletionLsn was equal
// to key>; when snapshot counter reaches zero, the key is deleted from map
TMap<ui64, ui32> CurrentSnapshots;
@@ -53,18 +53,21 @@ namespace NKikimr {
TActorId ActorId;
// a queue of removed huge blobs per compaction
- struct TRemovedHugeBlobsQueueItem {
+ struct TReleaseQueueItem {
ui64 RecordLsn;
TDiskPartVec RemovedHugeBlobs;
+ TVector<TChunkIdx> ChunksToForget;
TLogSignature Signature;
- TRemovedHugeBlobsQueueItem(ui64 recordLsn, TDiskPartVec&& removedHugeBlobs, TLogSignature signature)
+ TReleaseQueueItem(ui64 recordLsn, TDiskPartVec&& removedHugeBlobs, TVector<TChunkIdx> chunksToForget,
+ TLogSignature signature)
: RecordLsn(recordLsn)
, RemovedHugeBlobs(std::move(removedHugeBlobs))
+ , ChunksToForget(std::move(chunksToForget))
, Signature(signature)
{}
};
- TDeque<TRemovedHugeBlobsQueueItem> RemovedHugeBlobsQueue;
+ TDeque<TReleaseQueueItem> ReleaseQueue;
public:
void SetActorId(const TActorId& actorId) {
@@ -85,19 +88,19 @@ namespace NKikimr {
// this function is called every time when compaction is about to commit new entrypoint containing at least
// one removed huge blob; recordLsn is allocated LSN of this entrypoint
- void Update(ui64 recordLsn, TDiskPartVec&& removedHugeBlobs, const TActorContext& ctx,
- const TActorId& hugeKeeperId, TLogSignature signature) {
+ void Update(ui64 recordLsn, TDiskPartVec&& removedHugeBlobs, TVector<TChunkIdx> chunksToForget, TLogSignature signature,
+ const TActorContext& ctx, const TActorId& hugeKeeperId, const TActorId& skeletonId, const TPDiskCtxPtr& pdiskCtx) {
Y_VERIFY(recordLsn > LastDeletionLsn);
LastDeletionLsn = recordLsn;
- RemovedHugeBlobsQueue.emplace_back(recordLsn, std::move(removedHugeBlobs), signature);
- ProcessRemovedHugeBlobsQueue(ctx, hugeKeeperId);
+ ReleaseQueue.emplace_back(recordLsn, std::move(removedHugeBlobs), std::move(chunksToForget), signature);
+ ProcessReleaseQueue(ctx, hugeKeeperId, skeletonId, pdiskCtx);
}
void RenderState(IOutputStream &str) {
HTML(str) {
DIV_CLASS("panel panel-default") {
DIV_CLASS("panel-heading") {
- str << "Delayed Huge Blob Deleter";
+ str << "Delayed Compaction Deleter";
}
DIV_CLASS("panel-body") {
DIV_CLASS("panel panel-default") {
@@ -136,15 +139,20 @@ namespace NKikimr {
}
ui32 index = 1;
- for (const auto &record : RemovedHugeBlobsQueue) {
+ for (const auto &record : ReleaseQueue) {
TMap<TChunkIdx, ui32> slots;
for (const TDiskPart &part : record.RemovedHugeBlobs) {
++slots[part.ChunkIdx];
}
+ for (const TChunkIdx chunkIdx : record.ChunksToForget) {
+ ui32& value = slots[chunkIdx];
+ Y_VERIFY(!value);
+ value = Max<ui32>();
+ }
DIV_CLASS("panel panel-default") {
DIV_CLASS("panel-heading") {
- str << "RemovedHugeBlobsQueue[" << index << "]";
+ str << "ReleaseQueue[" << index << "]";
}
DIV_CLASS("panel-body") {
DIV() {
@@ -161,10 +169,16 @@ namespace NKikimr {
}
}
TABLEBODY() {
- for (const auto &pair : slots) {
+ for (const auto& [chunkIdx, value] : slots) {
TABLER() {
- TABLED() { str << pair.first; }
- TABLED() { str << pair.second; }
+ TABLED() { str << chunkIdx; }
+ TABLED() {
+ if (value != Max<ui32>()) {
+ str << value;
+ } else {
+ str << "decommitted SST chunk";
+ }
+ }
}
}
}
@@ -180,27 +194,33 @@ namespace NKikimr {
}
private:
- friend class TDelayedHugeBlobDeleterActor;
+ friend class TDelayedCompactionDeleterActor;
- void ReleaseSnapshot(ui64 cookie, const TActorContext& ctx, const TActorId& hugeKeeperId) {
+ void ReleaseSnapshot(ui64 cookie, const TActorContext& ctx, const TActorId& hugeKeeperId, const TActorId& skeletonId,
+ const TPDiskCtxPtr& pdiskCtx) {
auto it = CurrentSnapshots.find(cookie);
Y_VERIFY(it != CurrentSnapshots.end() && it->second > 0);
if (!--it->second) {
CurrentSnapshots.erase(it);
- ProcessRemovedHugeBlobsQueue(ctx, hugeKeeperId);
+ ProcessReleaseQueue(ctx, hugeKeeperId, skeletonId, pdiskCtx);
}
}
- void ProcessRemovedHugeBlobsQueue(const TActorContext& ctx, const TActorId& hugeKeeperId) {
+ void ProcessReleaseQueue(const TActorContext& ctx, const TActorId& hugeKeeperId, const TActorId& skeletonId,
+ const TPDiskCtxPtr& pdiskCtx) {
// if we have no snapshots, we can safely process all messages; otherwise we can process only those messages
// which do not have snapshots created before the point of compaction
- while (RemovedHugeBlobsQueue) {
- TRemovedHugeBlobsQueueItem& item = RemovedHugeBlobsQueue.front();
+ while (ReleaseQueue) {
+ 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));
- RemovedHugeBlobsQueue.pop_front();
+ if (item.ChunksToForget) {
+ TActivationContext::Send(new IEventHandle(pdiskCtx->PDiskId, skeletonId, new NPDisk::TEvChunkForget(
+ pdiskCtx->Dsk->Owner, pdiskCtx->Dsk->OwnerRound, std::move(item.ChunksToForget))));
+ }
+ ReleaseQueue.pop_front();
} else {
// we have no matching record
break;
@@ -209,24 +229,24 @@ namespace NKikimr {
}
};
- struct TDelayedHugeBlobDeleterNotifier : public TThrRefBase {
+ struct TDelayedCompactionDeleterNotifier : public TThrRefBase {
TActorSystem* const ActorSystem;
- const TIntrusivePtr<TDelayedHugeBlobDeleterInfo> Info;
+ const TIntrusivePtr<TDelayedCompactionDeleterInfo> Info;
const ui64 Cookie;
- TDelayedHugeBlobDeleterNotifier(TActorSystem *actorSystem, TIntrusivePtr<TDelayedHugeBlobDeleterInfo> info)
+ TDelayedCompactionDeleterNotifier(TActorSystem *actorSystem, TIntrusivePtr<TDelayedCompactionDeleterInfo> info)
: ActorSystem(actorSystem)
, Info(std::move(info))
, Cookie(Info->TakeSnapshot())
{}
// implemented in blobstorage_hull.h
- ~TDelayedHugeBlobDeleterNotifier() {
+ ~TDelayedCompactionDeleterNotifier() {
ActorSystem->Send(new IEventHandle(Info->GetActorId(), TActorId(), new TEvHullReleaseSnapshot(Cookie)));
}
};
- IActor *CreateDelayedHugeBlobDeleterActor(const TActorId &hugeKeeperId,
- TIntrusivePtr<TDelayedHugeBlobDeleterInfo> info);
+ IActor *CreateDelayedCompactionDeleterActor(const TActorId hugeKeeperId, const TActorId skeletonId,
+ TPDiskCtxPtr pdiskCtx, TIntrusivePtr<TDelayedCompactionDeleterInfo> info);
} // NKikimr
diff --git a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_monactors.cpp b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_monactors.cpp
index 09688f603c..48f91c8d7d 100644
--- a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_monactors.cpp
+++ b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_monactors.cpp
@@ -62,7 +62,7 @@ namespace NKikimr {
TString DskSpaceTrackerInfo;
TString LocalRecovInfo;
TString AnubisRunnerInfo;
- TString DelayedHugeBlobDeleterInfo;
+ TString DelayedCompactionDeleterInfo;
TString ScrubInfo;
friend class TActorBootstrapped<TSkeletonMonMainPageActor>;
@@ -74,7 +74,7 @@ namespace NKikimr {
Counter++;
ctx.Send(Db->SkeletonID, new NMon::TEvHttpInfo(Ev->Get()->Request, TDbMon::HullInfoId));
Counter++;
- ctx.Send(Db->SkeletonID, new NMon::TEvHttpInfo(Ev->Get()->Request, TDbMon::DelayedHugeBlobDeleterId));
+ ctx.Send(Db->SkeletonID, new NMon::TEvHttpInfo(Ev->Get()->Request, TDbMon::DelayedCompactionDeleterId));
Counter++;
}
@@ -154,7 +154,7 @@ namespace NKikimr {
DIV_CLASS("col-md-6") {Output(HugeKeeperInfo, str, "Huge Blob Keeper");}
DIV_CLASS("col-md-6") {Output(DskSpaceTrackerInfo, str, "Disk Space Tracker");}
DIV_CLASS("col-md-6") {Output(LocalRecovInfo, str, "Local Recovery Info");}
- DIV_CLASS("col-md-6") {Output(DelayedHugeBlobDeleterInfo, str, "Delayed Huge Blob Deleter Info");}
+ DIV_CLASS("col-md-6") {Output(DelayedCompactionDeleterInfo, str, "Delayed Compaction Deleter Info");}
DIV_CLASS("col-md-6") {Output(ScrubInfo, str, "Scrub Info");}
// uses column wrapping (sum is greater than 12)
}
@@ -193,7 +193,7 @@ namespace NKikimr {
{TDbMon::DskSpaceTrackerId, &TThis::DskSpaceTrackerInfo},
{TDbMon::LocalRecovInfoId, &TThis::LocalRecovInfo},
{TDbMon::AnubisRunnerId, &TThis::AnubisRunnerInfo},
- {TDbMon::DelayedHugeBlobDeleterId, &TThis::DelayedHugeBlobDeleterInfo},
+ {TDbMon::DelayedCompactionDeleterId, &TThis::DelayedCompactionDeleterInfo},
{TDbMon::ScrubId, &TThis::ScrubInfo},
};
diff --git a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp
index 64df734d78..46187ab41e 100644
--- a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp
+++ b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp
@@ -1943,7 +1943,7 @@ namespace NKikimr {
ctx.Send(ev->Sender, new NMon::TEvHttpInfoRes(str.Str(), TDbMon::LocalRecovInfoId));
break;
}
- case TDbMon::DelayedHugeBlobDeleterId: {
+ case TDbMon::DelayedCompactionDeleterId: {
TStringStream str;
if (Hull) {
Hull->OutputHtmlForHugeBlobDeleter(str);
@@ -2293,6 +2293,10 @@ namespace NKikimr {
ctx.Send(ev->Forward(Hull->GetHullDs()->LogoBlobs->LIActor));
}
+ void Handle(NPDisk::TEvChunkForgetResult::TPtr ev) {
+ CHECK_PDISK_RESPONSE(VCtx, ev, TActivationContext::AsActorContext());
+ }
+
// NOTES: we have 4 state functions, one of which is an error state (StateDatabaseError) and
// others are good: StateLocalRecovery, StateSyncGuidRecovery, StateNormal
// We switch between states in the following manner:
@@ -2343,6 +2347,7 @@ namespace NKikimr {
FFunc(TEvBlobStorage::EvRecoverBlob, ForwardToScrubActor)
FFunc(TEvBlobStorage::EvNonrestoredCorruptedBlobNotify, ForwardToScrubActor)
HFunc(TEvProxyQueueState, Handle)
+ hFunc(NPDisk::TEvChunkForgetResult, Handle)
)
STRICT_STFUNC(StateSyncGuidRecovery,
@@ -2393,6 +2398,7 @@ namespace NKikimr {
HFunc(TEvRestoreCorruptedBlob, Handle)
HFunc(TEvBlobStorage::TEvCaptureVDiskLayout, Handle)
HFunc(TEvProxyQueueState, Handle)
+ hFunc(NPDisk::TEvChunkForgetResult, Handle)
)
STRICT_STFUNC(StateNormal,
@@ -2454,6 +2460,7 @@ namespace NKikimr {
HFunc(TEvRestoreCorruptedBlob, Handle)
HFunc(TEvBlobStorage::TEvCaptureVDiskLayout, Handle)
HFunc(TEvProxyQueueState, Handle)
+ hFunc(NPDisk::TEvChunkForgetResult, Handle)
)
STRICT_STFUNC(StateDatabaseError,
@@ -2478,6 +2485,7 @@ namespace NKikimr {
HFunc(TEvBlobStorage::TEvCaptureVDiskLayout, Handle)
HFunc(TEvProxyQueueState, Handle)
hFunc(TEvVPatchDyingRequest, Handle)
+ hFunc(NPDisk::TEvChunkForgetResult, Handle)
)
PDISK_TERMINATE_STATE_FUNC_DEF;