aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenstore/include')
-rw-r--r--src/zenstore/include/zenstore/gc.h35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/zenstore/include/zenstore/gc.h b/src/zenstore/include/zenstore/gc.h
index 1b9929216..409c9b4d6 100644
--- a/src/zenstore/include/zenstore/gc.h
+++ b/src/zenstore/include/zenstore/gc.h
@@ -3,6 +3,7 @@
#pragma once
#include <zencore/iohash.h>
+#include <zencore/logbase.h>
#include <zencore/thread.h>
#include <zenstore/caslog.h>
#include <zenstore/scrubcontext.h>
@@ -24,10 +25,6 @@ ZEN_THIRD_PARTY_INCLUDES_START
#include <tsl/robin_set.h>
ZEN_THIRD_PARTY_INCLUDES_END
-namespace spdlog {
-class logger;
-}
-
namespace zen {
class CidStore;
@@ -360,8 +357,8 @@ public:
void SetDiskWriteBlocker(const DiskWriteBlocker* Monitor) { m_DiskWriteBlocker = Monitor; }
private:
- spdlog::logger& Log() { return m_Log; }
- spdlog::logger& m_Log;
+ LoggerRef Log() { return m_Log; }
+ LoggerRef m_Log;
mutable RwLock m_Lock;
std::vector<GcContributor*> m_GcContribs;
std::vector<GcStorage*> m_GcStorage;
@@ -483,19 +480,19 @@ public:
bool TriggerScrub(const TriggerScrubParams& Params);
private:
- void SchedulerThread();
- void CollectGarbage(const GcClock::TimePoint& CacheExpireTime,
- const GcClock::TimePoint& ProjectStoreExpireTime,
- bool Delete,
- bool CollectSmallObjects,
- bool SkipCid,
- GcVersion UseGCVersion);
- void ScrubStorage(bool DoDelete, std::chrono::seconds TimeSlice);
- spdlog::logger& Log() { return m_Log; }
- virtual bool AreDiskWritesAllowed() const override { return !m_AreDiskWritesBlocked.load(); }
- DiskSpace CheckDiskSpace();
-
- spdlog::logger& m_Log;
+ void SchedulerThread();
+ void CollectGarbage(const GcClock::TimePoint& CacheExpireTime,
+ const GcClock::TimePoint& ProjectStoreExpireTime,
+ bool Delete,
+ bool CollectSmallObjects,
+ bool SkipCid,
+ GcVersion UseGCVersion);
+ void ScrubStorage(bool DoDelete, std::chrono::seconds TimeSlice);
+ LoggerRef Log() { return m_Log; }
+ virtual bool AreDiskWritesAllowed() const override { return !m_AreDiskWritesBlocked.load(); }
+ DiskSpace CheckDiskSpace();
+
+ LoggerRef m_Log;
GcManager& m_GcManager;
GcSchedulerConfig m_Config;
GcClock::TimePoint m_LastGcTime{};