aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-11-13 16:19:39 +0100
committerGitHub <[email protected]>2023-11-13 16:19:39 +0100
commitd52bed8d5a37a39c88b78a19e22f2b7b3f6dd1d6 (patch)
tree2709bce7020faa9c73e784dd2a5997b384395b56 /src/zenstore/include
parentpackage dependency clean-ups (#531) (diff)
downloadzen-d52bed8d5a37a39c88b78a19e22f2b7b3f6dd1d6.tar.xz
zen-d52bed8d5a37a39c88b78a19e22f2b7b3f6dd1d6.zip
gc history log (#519)
- Feature: Writes a `gc.log` with settings and detailed result after each GC execution (version 2 only) - Break out file name rotate to allow access for gclog - CompactBinaryToJson(MemoryView Data, StringBuilderBase& InBuilder)
Diffstat (limited to 'src/zenstore/include')
-rw-r--r--src/zenstore/include/zenstore/gc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/zenstore/include/zenstore/gc.h b/src/zenstore/include/zenstore/gc.h
index 409c9b4d6..d4c7bba25 100644
--- a/src/zenstore/include/zenstore/gc.h
+++ b/src/zenstore/include/zenstore/gc.h
@@ -117,6 +117,10 @@ struct GcResult
void Sum();
};
+class CbObjectWriter;
+
+void WriteGCResult(CbObjectWriter& Writer, const GcResult& Result, bool HumanReadable, bool IncludeDetails);
+
struct GcCtx
{
const GcSettings Settings;
@@ -491,6 +495,7 @@ private:
LoggerRef Log() { return m_Log; }
virtual bool AreDiskWritesAllowed() const override { return !m_AreDiskWritesBlocked.load(); }
DiskSpace CheckDiskSpace();
+ void AppendGCLog(GcClock::TimePoint GcStartTime, const GcSettings& Settings, const GcResult& Result);
LoggerRef m_Log;
GcManager& m_GcManager;
@@ -517,6 +522,8 @@ private:
TCasLogFile<DiskUsageWindow::DiskUsageEntry> m_DiskUsageLog;
DiskUsageWindow m_DiskUsageWindow;
+
+ RwLock m_GcLogLock;
};
void gc_forcelink();