diff options
| author | Dan Engelbrecht <[email protected]> | 2025-10-22 22:55:24 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-10-22 22:55:24 +0200 |
| commit | 1cc6a5cbd09f593df855f4602228546b8edf67ee (patch) | |
| tree | aca1102dd9fbad5aee9098fec2d524c0cbb4b976 /src | |
| parent | add support for OTLP logging/tracing (#599) (diff) | |
| download | zen-1cc6a5cbd09f593df855f4602228546b8edf67ee.tar.xz zen-1cc6a5cbd09f593df855f4602228546b8edf67ee.zip | |
remove scope in GC that prevented GC from executing (#600)
Diffstat (limited to 'src')
| -rw-r--r-- | src/zenstore/gc.cpp | 61 |
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) |