aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/gc.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-10-22 22:55:24 +0200
committerGitHub Enterprise <[email protected]>2025-10-22 22:55:24 +0200
commit1cc6a5cbd09f593df855f4602228546b8edf67ee (patch)
treeaca1102dd9fbad5aee9098fec2d524c0cbb4b976 /src/zenstore/gc.cpp
parentadd support for OTLP logging/tracing (#599) (diff)
downloadzen-1cc6a5cbd09f593df855f4602228546b8edf67ee.tar.xz
zen-1cc6a5cbd09f593df855f4602228546b8edf67ee.zip
remove scope in GC that prevented GC from executing (#600)
Diffstat (limited to 'src/zenstore/gc.cpp')
-rw-r--r--src/zenstore/gc.cpp61
1 files changed, 31 insertions, 30 deletions
diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp
index 61ac2ef69..3fc795f9e 100644
--- a/src/zenstore/gc.cpp
+++ b/src/zenstore/gc.cpp
@@ -2469,39 +2469,40 @@ GcScheduler::SchedulerThread()
WaitTime = m_Config.MonitorInterval;
continue;
}
+ }
- if (!SkipCid)
- {
- m_AttachmentPassIndex = NextAttachmentPassIndex;
- }
+ if (!SkipCid)
+ {
+ m_AttachmentPassIndex = NextAttachmentPassIndex;
+ }
- bool GcSuccess = CollectGarbage(CacheExpireTime,
- ProjectStoreExpireTime,
- BuildStoreExpireTime,
- DoDelete,
- CollectSmallObjects,
- SkipCid,
- UseGCVersion,
- CompactBlockUsageThresholdPercent,
- Verbose,
- SingleThreaded,
- AttachmentRangeMin,
- AttachmentRangeMax,
- StoreCacheAttachmentMetaData,
- StoreProjectAttachmentMetaData,
- EnableValidation,
- SilenceErrors);
- if (!GcSuccess)
- {
- SilenceErrors = true;
- ZEN_INFO("gc going into error state - gc errors will be demoted to warnings until we recover");
- }
- else if (SilenceErrors)
- {
- SilenceErrors = false;
- ZEN_INFO("gc recovered from error state - gc errors will be will be reported as errors again");
- }
+ bool GcSuccess = CollectGarbage(CacheExpireTime,
+ ProjectStoreExpireTime,
+ BuildStoreExpireTime,
+ DoDelete,
+ CollectSmallObjects,
+ SkipCid,
+ UseGCVersion,
+ CompactBlockUsageThresholdPercent,
+ Verbose,
+ SingleThreaded,
+ AttachmentRangeMin,
+ AttachmentRangeMax,
+ StoreCacheAttachmentMetaData,
+ StoreProjectAttachmentMetaData,
+ EnableValidation,
+ SilenceErrors);
+ if (!GcSuccess)
+ {
+ SilenceErrors = true;
+ ZEN_INFO("gc going into error state - gc errors will be demoted to warnings until we recover");
}
+ else if (SilenceErrors)
+ {
+ SilenceErrors = false;
+ ZEN_INFO("gc recovered from error state - gc errors will be will be reported as errors again");
+ }
+
WaitTime = std::chrono::seconds(0);
}
catch (const std::system_error& SystemError)