diff options
| author | Dan Engelbrecht <[email protected]> | 2025-01-13 12:51:12 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-01-13 12:51:12 +0100 |
| commit | d7dbc855ab2bd2ccf86f809b463bda3ba38d64ce (patch) | |
| tree | efbdb4b180026c5d438d599df6f359e5a63f563f /src/zenstore | |
| parent | 5.5.17-pre1 (diff) | |
| download | zen-d7dbc855ab2bd2ccf86f809b463bda3ba38d64ce.tar.xz zen-d7dbc855ab2bd2ccf86f809b463bda3ba38d64ce.zip | |
Suppress progress report callback if oplog import detects zero op oplog (#271)
* Suppress progress report callback if oplog import detects oplog with zero ops
* output error code when catching system errors
Diffstat (limited to 'src/zenstore')
| -rw-r--r-- | src/zenstore/gc.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp index 50588b8c0..7ac10d613 100644 --- a/src/zenstore/gc.cpp +++ b/src/zenstore/gc.cpp @@ -1810,7 +1810,7 @@ GcScheduler::AppendGCLog(std::string_view Id, GcClock::TimePoint StartTime, cons } else { - ZEN_ERROR("writing gc result failed with system error exception: '{}'", SystemError.what()); + ZEN_ERROR("writing gc result failed with system error exception: '{}' ({})", SystemError.what(), SystemError.code().value()); } } catch (const std::bad_alloc& BadAlloc) @@ -2274,7 +2274,9 @@ GcScheduler::SchedulerThread() } else { - ZEN_ERROR("scheduling garbage collection failed with system error exception: '{}'", SystemError.what()); + ZEN_ERROR("scheduling garbage collection failed with system error exception: '{}' ({})", + SystemError.what(), + SystemError.code().value()); } m_LastGcTime = GcClock::Now(); m_LastLightweightGcTime = m_LastGcTime; @@ -2596,11 +2598,15 @@ GcScheduler::CollectGarbage(const GcClock::TimePoint& CacheExpireTime, } if (RetryCount == 0) { - ZEN_ERROR("writing gc scheduler state failed with system error exception: '{}'", SystemError.what()); + ZEN_ERROR("writing gc scheduler state failed with system error exception: '{}' ({})", + SystemError.what(), + SystemError.code().value()); } else { - ZEN_WARN("writing gc scheduler state failed with system error exception: '{}'", SystemError.what()); + ZEN_WARN("writing gc scheduler state failed with system error exception: '{}' ({})", + SystemError.what(), + SystemError.code().value()); } } catch (const std::bad_alloc& BadAlloc) @@ -2636,11 +2642,15 @@ GcScheduler::CollectGarbage(const GcClock::TimePoint& CacheExpireTime, { if (SilenceErrors) { - ZEN_WARN("scheduling garbage collection failed with system error exception: '{}'", SystemError.what()); + ZEN_WARN("scheduling garbage collection failed with system error exception: '{}' ({})", + SystemError.what(), + SystemError.code().value()); } else { - ZEN_ERROR("scheduling garbage collection failed with system error exception: '{}'", SystemError.what()); + ZEN_ERROR("scheduling garbage collection failed with system error exception: '{}' ({})", + SystemError.what(), + SystemError.code().value()); } } m_LastGcTime = GcClock::Now(); |