diff options
| author | Stefan Boberg <[email protected]> | 2023-05-15 20:54:46 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2023-05-15 20:54:46 +0200 |
| commit | 583b308a1e605da9bd70484767d6134891b9c3ba (patch) | |
| tree | 5769264a7f637823c39e62cd61a2b44316102d5a /src/zenstore/include | |
| parent | some HttpClient changes eliminating some cpr helpers (diff) | |
| download | zen-583b308a1e605da9bd70484767d6134891b9c3ba.tar.xz zen-583b308a1e605da9bd70484767d6134891b9c3ba.zip | |
minor GC API cleanup
Scrub -> ScrubStorage
Trigger -> TriggerGc (to make relationship to TriggerScrub clearer)
Diffstat (limited to 'src/zenstore/include')
| -rw-r--r-- | src/zenstore/include/zenstore/cidstore.h | 2 | ||||
| -rw-r--r-- | src/zenstore/include/zenstore/gc.h | 28 |
2 files changed, 15 insertions, 15 deletions
diff --git a/src/zenstore/include/zenstore/cidstore.h b/src/zenstore/include/zenstore/cidstore.h index 16ca78225..ecc7faab0 100644 --- a/src/zenstore/include/zenstore/cidstore.h +++ b/src/zenstore/include/zenstore/cidstore.h @@ -75,7 +75,7 @@ public: bool ContainsChunk(const IoHash& DecompressedId); void FilterChunks(HashKeySet& InOutChunks); void Flush(); - void Scrub(ScrubContext& Ctx); + void ScrubStorage(ScrubContext& Ctx); CidStoreSize TotalSize() const; private: diff --git a/src/zenstore/include/zenstore/gc.h b/src/zenstore/include/zenstore/gc.h index fe9857e6a..0e18315d9 100644 --- a/src/zenstore/include/zenstore/gc.h +++ b/src/zenstore/include/zenstore/gc.h @@ -220,14 +220,14 @@ public: void Shutdown(); GcSchedulerStatus Status() const { return static_cast<GcSchedulerStatus>(m_Status.load()); } - struct TriggerParams + struct TriggerGcParams { bool CollectSmallObjects = false; std::chrono::seconds MaxCacheDuration = std::chrono::seconds::max(); uint64_t DiskSizeSoftLimit = 0; }; - bool Trigger(const TriggerParams& Params); + bool TriggerGc(const TriggerGcParams& Params); private: void SchedulerThread(); @@ -237,18 +237,18 @@ private: virtual bool AreDiskWritesAllowed() const override { return !m_AreDiskWritesBlocked.load(); } void CheckDiskSpace(const DiskSpace& Space); - spdlog::logger& m_Log; - GcManager& m_GcManager; - GcSchedulerConfig m_Config; - GcClock::TimePoint m_LastGcTime{}; - GcClock::TimePoint m_LastGcExpireTime{}; - GcClock::TimePoint m_NextGcTime{}; - std::atomic_uint32_t m_Status{}; - std::thread m_GcThread; - std::mutex m_GcMutex; - std::condition_variable m_GcSignal; - std::optional<TriggerParams> m_TriggerParams; - std::atomic_bool m_AreDiskWritesBlocked = false; + spdlog::logger& m_Log; + GcManager& m_GcManager; + GcSchedulerConfig m_Config; + GcClock::TimePoint m_LastGcTime{}; + GcClock::TimePoint m_LastGcExpireTime{}; + GcClock::TimePoint m_NextGcTime{}; + std::atomic_uint32_t m_Status{}; + std::thread m_GcThread; + std::mutex m_GcMutex; + std::condition_variable m_GcSignal; + std::optional<TriggerGcParams> m_TriggerGcParams; + std::atomic_bool m_AreDiskWritesBlocked = false; TCasLogFile<DiskUsageWindow::DiskUsageEntry> m_DiskUsageLog; DiskUsageWindow m_DiskUsageWindow; |