aboutsummaryrefslogtreecommitdiff
path: root/zenserver/projectstore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-12-02 16:56:51 +0100
committerGitHub <[email protected]>2022-12-02 07:56:51 -0800
commit921078b38bfa91424c27ff707d950e26c18d3cd3 (patch)
treee71446e3ebc29f7ff8ad47c0c23d8b2e49211dbe /zenserver/projectstore.cpp
parentreduce gc log spam (INFO -> DEBUG) (#199) (diff)
downloadzen-921078b38bfa91424c27ff707d950e26c18d3cd3.tar.xz
zen-921078b38bfa91424c27ff707d950e26c18d3cd3.zip
Size based gc trigger (#197)
- Feature: Disk size triggered GC, a soft disk usage limit for cache data. - Feature: New option `--gc-disk-size-soft-limit` (command line), `gc.cache.disksizesoftlimit` (lua config) controlling limit for soft disk usage limit. Defaults to zero which disables soft disk usage limit. - Improvement: Disk write pressure in GC log and cleaned up clutter in GC logging.
Diffstat (limited to 'zenserver/projectstore.cpp')
-rw-r--r--zenserver/projectstore.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/zenserver/projectstore.cpp b/zenserver/projectstore.cpp
index c3f10c9cd..3a65feb0f 100644
--- a/zenserver/projectstore.cpp
+++ b/zenserver/projectstore.cpp
@@ -1156,7 +1156,7 @@ ProjectStore::CollectGarbage(GcContext& GcCtx)
if (!GcCtx.IsDeletionMode())
{
- ZEN_INFO("garbage collect DISABLED, for '{}' ", m_ProjectBasePath.string());
+ ZEN_DEBUG("garbage collect DISABLED, for '{}' ", m_ProjectBasePath.string());
return;
}
@@ -2756,7 +2756,7 @@ TEST_CASE("project.store.gc")
}
{
- GcContext GcCtx;
+ GcContext GcCtx(GcClock::Now() - std::chrono::hours(24));
ProjectStore.GatherReferences(GcCtx);
size_t RefCount = 0;
GcCtx.IterateCids([&RefCount](const IoHash&) { RefCount++; });
@@ -2769,7 +2769,7 @@ TEST_CASE("project.store.gc")
std::filesystem::remove(Project1FilePath);
{
- GcContext GcCtx;
+ GcContext GcCtx(GcClock::Now() - std::chrono::hours(24));
ProjectStore.GatherReferences(GcCtx);
size_t RefCount = 0;
GcCtx.IterateCids([&RefCount](const IoHash&) { RefCount++; });