aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/gc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenstore/gc.cpp')
-rw-r--r--src/zenstore/gc.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp
index 1a34019fb..d51144a5a 100644
--- a/src/zenstore/gc.cpp
+++ b/src/zenstore/gc.cpp
@@ -663,7 +663,7 @@ GcManager::CollectGarbage(const GcSettings& Settings)
StoreCompactors.insert_or_assign(std::move(StoreCompactor), &Stats->second.CompactStoreStats);
}
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
ZEN_ERROR("GCV2: Failed removing expired data for {}. Reason: '{}'", Owner->GetGcName(Ctx), Ex.what());
}
@@ -733,7 +733,7 @@ GcManager::CollectGarbage(const GcSettings& Settings)
ReferencePruners.insert_or_assign(Index, std::move(ReferencePruner));
}
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
ZEN_ERROR("GCV2: Failed creating reference pruners for {}. Reason: '{}'",
ReferenceStore->GetGcName(Ctx),
@@ -806,7 +806,7 @@ GcManager::CollectGarbage(const GcSettings& Settings)
}
}
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
ZEN_ERROR("GCV2: Failed creating reference checkers for {}. Reason: '{}'",
Referencer->GetGcName(Ctx),
@@ -863,7 +863,7 @@ GcManager::CollectGarbage(const GcSettings& Settings)
SCOPED_TIMER(Stats->second.PreCacheStateMS = std::chrono::milliseconds(Timer.GetElapsedTimeMs()););
Checker->PreCache(Ctx);
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
ZEN_ERROR("GCV2: Failed precaching for {}. Reason: '{}'", Checker->GetGcName(Ctx), Ex.what());
}
@@ -919,7 +919,7 @@ GcManager::CollectGarbage(const GcSettings& Settings)
SCOPED_TIMER(Stats->second.LockStateMS = std::chrono::milliseconds(Timer.GetElapsedTimeMs()););
Checker->LockState(Ctx);
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
ZEN_ERROR("GCV2: Failed locking state for {}. Reason: '{}'", Checker->GetGcName(Ctx), Ex.what());
}
@@ -997,7 +997,7 @@ GcManager::CollectGarbage(const GcSettings& Settings)
StoreCompactors.insert_or_assign(std::move(StoreCompactor), &Stats->CompactStoreStats);
}
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
ZEN_ERROR("GCV2: Failed locking state for {}. Reason: '{}'", Pruner->GetGcName(Ctx), Ex.what());
}
@@ -1563,7 +1563,7 @@ GcScheduler::AppendGCLog(GcClock::TimePoint StartTime, const GcSettings& Setting
GcLogFile.Write(EntryBuffer, AppendPos);
}
}
- catch (std::system_error& SystemError)
+ catch (const std::system_error& SystemError)
{
if (IsOOM(SystemError.code()))
{
@@ -1578,11 +1578,11 @@ GcScheduler::AppendGCLog(GcClock::TimePoint StartTime, const GcSettings& Setting
ZEN_ERROR("writing gc result failed with system error exception: '{}'", SystemError.what());
}
}
- catch (std::bad_alloc& BadAlloc)
+ catch (const std::bad_alloc& BadAlloc)
{
ZEN_WARN("writing gc result ran out of memory: '{}'", BadAlloc.what());
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
ZEN_ERROR("writing gc result failed with: '{}'", Ex.what());
}
@@ -1970,7 +1970,7 @@ GcScheduler::SchedulerThread()
WaitTime = std::chrono::seconds(0);
}
- catch (std::system_error& SystemError)
+ catch (const std::system_error& SystemError)
{
if (IsOOM(SystemError.code()))
{
@@ -1988,14 +1988,14 @@ GcScheduler::SchedulerThread()
m_LastLightweightGcTime = m_LastGcTime;
WaitTime = m_Config.MonitorInterval;
}
- catch (std::bad_alloc& BadAlloc)
+ catch (const std::bad_alloc& BadAlloc)
{
ZEN_WARN("scheduling garbage collection ran out of memory: '{}'", BadAlloc.what());
m_LastGcTime = GcClock::Now();
m_LastLightweightGcTime = m_LastGcTime;
WaitTime = m_Config.MonitorInterval;
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
ZEN_ERROR("scheduling garbage collection failed with: '{}'", Ex.what());
m_LastGcTime = GcClock::Now();
@@ -2028,7 +2028,7 @@ GcScheduler::ScrubStorage(bool DoDelete, bool SkipCid, std::chrono::seconds Time
Ctx.SetShouldDelete(DoDelete);
m_GcManager.ScrubStorage(Ctx);
}
- catch (ScrubDeadlineExpiredException&)
+ catch (const ScrubDeadlineExpiredException&)
{
ZEN_INFO("scrubbing deadline expired (top level), operation incomplete!");
}
@@ -2189,7 +2189,7 @@ GcScheduler::CollectGarbage(const GcClock::TimePoint& CacheExpireTime,
SchedulerState << "LastGcExpireTime"sv << static_cast<int64_t>(m_LastGcExpireTime.time_since_epoch().count());
SaveCompactBinaryObject(Path, SchedulerState.Save());
}
- catch (std::system_error& SystemError)
+ catch (const std::system_error& SystemError)
{
if (IsOOM(SystemError.code()))
{
@@ -2204,11 +2204,11 @@ GcScheduler::CollectGarbage(const GcClock::TimePoint& CacheExpireTime,
ZEN_ERROR("writing gc scheduler state failed with system error exception: '{}'", SystemError.what());
}
}
- catch (std::bad_alloc& BadAlloc)
+ catch (const std::bad_alloc& BadAlloc)
{
ZEN_WARN("writing gc scheduler state ran out of memory: '{}'", BadAlloc.what());
}
- catch (std::exception& Ex)
+ catch (const std::exception& Ex)
{
ZEN_ERROR("writing gc scheduler state failed with: '{}'", Ex.what());
}