diff options
| author | Dan Engelbrecht <[email protected]> | 2025-10-23 14:57:34 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-10-23 14:57:34 +0200 |
| commit | aa3c00b9a7f19b1ebf61f5251348ab298cafd4a3 (patch) | |
| tree | f83b813b148e473b1d7c13f38585540721807e98 /src/zenstore/include | |
| parent | add host discovery and zen cache support for oplog import (#601) (diff) | |
| download | zen-aa3c00b9a7f19b1ebf61f5251348ab298cafd4a3.tar.xz zen-aa3c00b9a7f19b1ebf61f5251348ab298cafd4a3.zip | |
if we are low on disk space, only run GC if it will remove any data (#603)
* if we are low on disk space, only run GC if it will remove any data
* make sure we don't treat bail of GC due to disk space as success causing 0 wait between GC passes
Diffstat (limited to 'src/zenstore/include')
| -rw-r--r-- | src/zenstore/include/zenstore/gc.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/zenstore/include/zenstore/gc.h b/src/zenstore/include/zenstore/gc.h index 3223fba39..5150ecd42 100644 --- a/src/zenstore/include/zenstore/gc.h +++ b/src/zenstore/include/zenstore/gc.h @@ -476,7 +476,7 @@ public: GcClock::Tick EndTick, GcClock::Tick DeltaWidth, uint64_t& OutMaxDelta) const; - GcClock::Tick FindTimepointThatRemoves(uint64_t Amount, GcClock::Tick EndTick) const; + GcClock::Tick FindTimepointThatRemoves(uint64_t Amount, GcClock::Tick EndTick, uint64_t& OutFoundAmount) const; }; /** @@ -529,6 +529,8 @@ public: private: void SchedulerThread(); + bool ReclaimDiskReserve(); + bool PrepareDiskReserve(); bool CollectGarbage(const GcClock::TimePoint& CacheExpireTime, const GcClock::TimePoint& ProjectStoreExpireTime, const GcClock::TimePoint& BuildStoreExpireTime, |