diff options
Diffstat (limited to 'src/zenstore/gc.cpp')
| -rw-r--r-- | src/zenstore/gc.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp index f3edf804d..2bcd086fc 100644 --- a/src/zenstore/gc.cpp +++ b/src/zenstore/gc.cpp @@ -546,7 +546,7 @@ FilterReferences(GcCtx& Ctx, std::string_view Context, std::vector<IoHash>& InOu return false; } - auto Log = [&Ctx]() { return Ctx.Logger; }; + ZEN_SCOPED_LOG(Ctx.Logger); const bool Filter = Ctx.Settings.AttachmentRangeMax != IoHash::Max || Ctx.Settings.AttachmentRangeMin != IoHash::Zero; @@ -2063,6 +2063,14 @@ GcScheduler::GetState() const { { std::unique_lock Lock(m_GcMutex); + + if (m_TriggerGcParams || m_TriggerScrubParams) + { + // If a trigger is pending, treat it as running + Result.Status = GcSchedulerStatus::kRunning; + return Result; + } + Result.LastFullGcTime = m_LastGcTime; Result.LastFullGCDiff = m_LastFullGCDiff; Result.LastFullGcDuration = m_LastFullGcDuration; @@ -2766,6 +2774,7 @@ GcScheduler::CollectGarbage(const GcClock::TimePoint& CacheExpireTime, ZEN_MEMSCOPE(GetGcTag()); ZEN_TRACE_CPU("GcScheduler::CollectGarbage"); + ZEN_TRACE_REGION_CAT("GcScheduler::CollectGarbage", "gc"); try { |