aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/zenserver.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-10-02 10:58:47 +0200
committerGitHub <[email protected]>2023-10-02 10:58:47 +0200
commit3259b5a7f90f374ea75af469f07a29020d6c9c2d (patch)
tree3437f75b24c531905cf4b4ce5957d685ce3c2e08 /src/zenserver/zenserver.cpp
parentSentry username fix (#435) (diff)
downloadzen-3259b5a7f90f374ea75af469f07a29020d6c9c2d.tar.xz
zen-3259b5a7f90f374ea75af469f07a29020d6c9c2d.zip
lightweight gc (#431)
- Feature: Add lightweight GC that only removes items from cache/project store without cleaning up data referenced in Cid store - Add `skipcid` parameter to http endpoint `admin/gc`, defaults to "false" - Add `--skipcid` option to `zen gc` command, defaults to false - Add `--gc-lightweight-interval-seconds` option to zenserver
Diffstat (limited to 'src/zenserver/zenserver.cpp')
-rw-r--r--src/zenserver/zenserver.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/zenserver/zenserver.cpp b/src/zenserver/zenserver.cpp
index fa7694573..e4143dc01 100644
--- a/src/zenserver/zenserver.cpp
+++ b/src/zenserver/zenserver.cpp
@@ -449,7 +449,10 @@ public:
m_VfsService->AddService(Ref<ZenCacheStore>(m_CacheStore));
m_Http->RegisterService(*m_VfsService);
- ZEN_INFO("initializing GC, enabled '{}', interval {}s", ServerOptions.GcConfig.Enabled, ServerOptions.GcConfig.IntervalSeconds);
+ ZEN_INFO("initializing GC, enabled '{}', interval {}s, lightweight interval {}s",
+ ServerOptions.GcConfig.Enabled,
+ ServerOptions.GcConfig.IntervalSeconds,
+ ServerOptions.GcConfig.LightweightIntervalSeconds);
zen::GcSchedulerConfig GcConfig{
.RootDirectory = m_DataRoot / "gc",
.MonitorInterval = std::chrono::seconds(ServerOptions.GcConfig.MonitorIntervalSeconds),
@@ -460,7 +463,8 @@ public:
.Enabled = ServerOptions.GcConfig.Enabled,
.DiskReserveSize = ServerOptions.GcConfig.DiskReserveSize,
.DiskSizeSoftLimit = ServerOptions.GcConfig.DiskSizeSoftLimit,
- .MinimumFreeDiskSpaceToAllowWrites = ServerOptions.GcConfig.MinimumFreeDiskSpaceToAllowWrites};
+ .MinimumFreeDiskSpaceToAllowWrites = ServerOptions.GcConfig.MinimumFreeDiskSpaceToAllowWrites,
+ .LightweightInterval = std::chrono::seconds(ServerOptions.GcConfig.LightweightIntervalSeconds)};
m_GcScheduler.Initialize(GcConfig);
// Create and register admin interface last to make sure all is properly initialized