aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/gc.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-05-15 20:54:46 +0200
committerStefan Boberg <[email protected]>2023-05-15 20:54:46 +0200
commit583b308a1e605da9bd70484767d6134891b9c3ba (patch)
tree5769264a7f637823c39e62cd61a2b44316102d5a /src/zenstore/gc.cpp
parentsome HttpClient changes eliminating some cpr helpers (diff)
downloadzen-583b308a1e605da9bd70484767d6134891b9c3ba.tar.xz
zen-583b308a1e605da9bd70484767d6134891b9c3ba.zip
minor GC API cleanup
Scrub -> ScrubStorage Trigger -> TriggerGc (to make relationship to TriggerScrub clearer)
Diffstat (limited to 'src/zenstore/gc.cpp')
-rw-r--r--src/zenstore/gc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp
index 503470bb0..9cbc43b1b 100644
--- a/src/zenstore/gc.cpp
+++ b/src/zenstore/gc.cpp
@@ -657,14 +657,14 @@ GcScheduler::Shutdown()
}
bool
-GcScheduler::Trigger(const GcScheduler::TriggerParams& Params)
+GcScheduler::TriggerGc(const GcScheduler::TriggerGcParams& Params)
{
if (m_Config.Enabled)
{
std::unique_lock Lock(m_GcMutex);
if (static_cast<uint32_t>(GcSchedulerStatus::kIdle) == m_Status)
{
- m_TriggerParams = Params;
+ m_TriggerGcParams = Params;
uint32_t IdleState = static_cast<uint32_t>(GcSchedulerStatus::kIdle);
if (m_Status.compare_exchange_strong(IdleState, static_cast<uint32_t>(GcSchedulerStatus::kRunning)))
{
@@ -735,10 +735,10 @@ GcScheduler::SchedulerThread()
std::chrono::seconds MaxCacheDuration = m_Config.MaxCacheDuration;
uint64_t DiskSizeSoftLimit = m_Config.DiskSizeSoftLimit;
GcClock::TimePoint Now = GcClock::Now();
- if (m_TriggerParams)
+ if (m_TriggerGcParams)
{
- const auto TriggerParams = m_TriggerParams.value();
- m_TriggerParams.reset();
+ const auto TriggerParams = m_TriggerGcParams.value();
+ m_TriggerGcParams.reset();
CollectSmallObjects = TriggerParams.CollectSmallObjects;
if (TriggerParams.MaxCacheDuration != std::chrono::seconds::max())