From 831f0787fca39682dec0141714eaebb7772b8639 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Wed, 14 Aug 2024 10:22:57 +0200 Subject: hardening and reduced spam from GC on failure (#112) * Retry writing GC state if it fails to handle transient problems * If GC operation fails demote errors to warnings on consecutive fails --- src/zenstore/include/zenstore/gc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/zenstore/include') diff --git a/src/zenstore/include/zenstore/gc.h b/src/zenstore/include/zenstore/gc.h index 2edb5e0a5..92f2bdf78 100644 --- a/src/zenstore/include/zenstore/gc.h +++ b/src/zenstore/include/zenstore/gc.h @@ -537,7 +537,7 @@ public: private: void SchedulerThread(); - void CollectGarbage(const GcClock::TimePoint& CacheExpireTime, + bool CollectGarbage(const GcClock::TimePoint& CacheExpireTime, const GcClock::TimePoint& ProjectStoreExpireTime, bool Delete, bool CollectSmallObjects, @@ -545,7 +545,8 @@ private: GcVersion UseGCVersion, uint32_t CompactBlockUsageThresholdPercent, bool Verbose, - bool SingleThreaded); + bool SingleThreaded, + bool SilenceErrors); void ScrubStorage(bool DoDelete, bool SkipCid, std::chrono::seconds TimeSlice); LoggerRef Log() { return m_Log; } virtual bool AreDiskWritesAllowed() const override { return !m_AreDiskWritesBlocked.load(); } -- cgit v1.2.3