diff options
| author | Stefan Boberg <[email protected]> | 2023-05-15 22:09:06 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2023-05-15 22:09:06 +0200 |
| commit | 193d3292e3c6cbcecc6ec70f54239e225d540d43 (patch) | |
| tree | a27721327e358ab0250b35aae25d378e994c4096 /src | |
| parent | added error reporting for bad BlockStore chunks (diff) | |
| download | zen-193d3292e3c6cbcecc6ec70f54239e225d540d43.tar.xz zen-193d3292e3c6cbcecc6ec70f54239e225d540d43.zip | |
removed remnants of ZEN_USE_REF_TRACKING
this code was originally meant to be used for GC but is no longer needed
Diffstat (limited to 'src')
| -rw-r--r-- | src/zenserver/cache/structuredcachestore.cpp | 19 | ||||
| -rw-r--r-- | src/zenstore/gc.cpp | 20 | ||||
| -rw-r--r-- | src/zenstore/include/zenstore/gc.h | 8 |
3 files changed, 0 insertions, 47 deletions
diff --git a/src/zenserver/cache/structuredcachestore.cpp b/src/zenserver/cache/structuredcachestore.cpp index e07a597e3..d56b3cfe2 100644 --- a/src/zenserver/cache/structuredcachestore.cpp +++ b/src/zenserver/cache/structuredcachestore.cpp @@ -240,25 +240,6 @@ ZenCacheNamespace::Put(std::string_view InBucket, const IoHash& HashKey, const Z m_DiskLayer.Put(InBucket, HashKey, Value); -#if ZEN_USE_REF_TRACKING - if (Value.Value.GetContentType() == ZenContentType::kCbObject) - { - if (ValidateCompactBinary(Value.Value, CbValidateMode::All) == CbValidateError::None) - { - CbObject Object{SharedBuffer(Value.Value)}; - - uint8_t TempBuffer[8 * sizeof(IoHash)]; - std::pmr::monotonic_buffer_resource Linear{TempBuffer, sizeof TempBuffer}; - std::pmr::polymorphic_allocator Allocator{&Linear}; - std::pmr::vector<IoHash> CidReferences{Allocator}; - - Object.IterateAttachments([&](CbFieldView Field) { CidReferences.push_back(Field.AsAttachment()); }); - - m_Gc.OnNewCidReferences(CidReferences); - } - } -#endif - if (Value.Value.Size() <= m_DiskLayerSizeThreshold) { m_MemLayer.Put(InBucket, HashKey, Value); diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp index 9cbc43b1b..a7c757877 100644 --- a/src/zenstore/gc.cpp +++ b/src/zenstore/gc.cpp @@ -420,26 +420,6 @@ GcManager::TotalStorageSize() const return TotalSize; } -#if ZEN_USE_REF_TRACKING -void -GcManager::OnNewCidReferences(std::span<IoHash> Hashes) -{ - ZEN_UNUSED(Hashes); -} - -void -GcManager::OnCommittedCidReferences(std::span<IoHash> Hashes) -{ - ZEN_UNUSED(Hashes); -} - -void -GcManager::OnDroppedCidReferences(std::span<IoHash> Hashes) -{ - ZEN_UNUSED(Hashes); -} -#endif - ////////////////////////////////////////////////////////////////////////// void DiskUsageWindow::KeepRange(GcClock::Tick StartTick, GcClock::Tick EndTick) diff --git a/src/zenstore/include/zenstore/gc.h b/src/zenstore/include/zenstore/gc.h index 0251aeb05..4c709b8a2 100644 --- a/src/zenstore/include/zenstore/gc.h +++ b/src/zenstore/include/zenstore/gc.h @@ -16,8 +16,6 @@ #include <span> #include <thread> -#define ZEN_USE_REF_TRACKING 0 // This is not currently functional - namespace spdlog { class logger; } @@ -153,12 +151,6 @@ public: const DiskWriteBlocker* GetDiskWriteBlocker() { return m_DiskWriteBlocker; } void SetDiskWriteBlocker(const DiskWriteBlocker* Monitor) { m_DiskWriteBlocker = Monitor; } -#if ZEN_USE_REF_TRACKING - void OnNewCidReferences(std::span<IoHash> Hashes); - void OnCommittedCidReferences(std::span<IoHash> Hashes); - void OnDroppedCidReferences(std::span<IoHash> Hashes); -#endif - private: spdlog::logger& Log() { return m_Log; } spdlog::logger& m_Log; |