diff options
| author | Dan Engelbrecht <[email protected]> | 2023-09-04 09:14:46 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-04 15:14:46 +0200 |
| commit | f43bee9eed90ee5175f9b3e0dd2a7b7d4b3145e4 (patch) | |
| tree | 02c1ed9658eadfdfd13795b932e4743b566a5941 /src/zenstore/gc.cpp | |
| parent | add `--write-config` to zenserver options (#382) (diff) | |
| download | zen-f43bee9eed90ee5175f9b3e0dd2a7b7d4b3145e4.tar.xz zen-f43bee9eed90ee5175f9b3e0dd2a7b7d4b3145e4.zip | |
retry file create (#383)
* add retry logic when creating files
* only write disk usage log if disk writes are allowed
* changelog
Diffstat (limited to 'src/zenstore/gc.cpp')
| -rw-r--r-- | src/zenstore/gc.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp index 245f76c92..79aea2752 100644 --- a/src/zenstore/gc.cpp +++ b/src/zenstore/gc.cpp @@ -838,8 +838,11 @@ GcScheduler::SchedulerThread() { const GcClock::Tick EpochTickCount = GcClock::Now().time_since_epoch().count(); std::unique_lock Lock(m_GcMutex); + if (AreDiskWritesAllowed()) + { + m_DiskUsageLog.Append({.SampleTime = EpochTickCount, .DiskUsage = TotalSize.DiskSize}); + } m_DiskUsageWindow.Append({.SampleTime = EpochTickCount, .DiskUsage = TotalSize.DiskSize}); - m_DiskUsageLog.Append({.SampleTime = EpochTickCount, .DiskUsage = TotalSize.DiskSize}); const GcClock::TimePoint LoadGraphStartTime = Now - LoadGraphTime; const GcClock::Tick Start = LoadGraphStartTime.time_since_epoch().count(); const GcClock::Tick End = Now.time_since_epoch().count(); |