pub struct GcStats {Show 16 fields
pub entries_evicted: usize,
pub bytes_freed: u64,
pub blobs_removed: usize,
pub duration_ms: u64,
pub skipped: bool,
pub entries_pinned: usize,
pub entries_unreclaimable: usize,
pub disk_bytes_reclaimed: u64,
pub entries_failed: usize,
pub entries_locked: usize,
pub entries_busy_snapshot: usize,
pub entries_recent_prefiltered: usize,
pub entries_import_pinned: usize,
pub evict_write_ms: u64,
pub bytes_held: u64,
pub housekeeping: Option<HousekeepingStats>,
}Expand description
Statistics returned by GC operations.
Fields§
§entries_evicted: usize§bytes_freed: u64Store-namespace bytes whose blob rows went away. Not filesystem
reclamation — clones in target/ can keep the blocks.
blobs_removed: usize§duration_ms: u64§skipped: bool§entries_pinned: usizeEntries eviction selected but could not remove because they were
accessed within EVICTION_IDLE_GRACE — a live build may be mid-restore
on them (#326, #182) — or have a durable remote-upload intent whose
local payload must survive until that intent is retired.
Recorded so the CLI can explain “evicted 0” while the store is over its limit. Without it that reads as “GC is broken”, which is what #509 was filed about and plausibly what turned #497 into a 113 GB bug report.
entries_unreclaimable: usizeEntries eviction selected but left in place because unlinking their
last-ref blobs would not free disk (hardlink or CoW clone still live
in a worktree). Distinct from Self::entries_pinned.
disk_bytes_reclaimed: u64Best-effort private bytes actually returned by unlinking store names.
entries_failed: usizeEntries eviction selected but failed to remove: an unreadable
meta.json (#276), a SQLite error. Counted rather than only logged, so
a sweep that keeps failing shows up in its own stats instead of only
as warning lines nobody reads.
entries_locked: usizeThe part of Self::entries_failed that was SQLite write contention
(SQLITE_BUSY / SQLITE_LOCKED): the sweep lost the write lock to live
builds, as opposed to finding a damaged entry.
entries_busy_snapshot: usizeFailed evictions caused by upgrading a stale WAL read snapshot to a writer. These fail immediately and cannot be cured by busy_timeout.
entries_recent_prefiltered: usizeRecently accessed candidates skipped before loading metadata or starting a SQLite transaction. Included in entries_pinned.
entries_import_pinned: usizeCandidates an automatic sweep kept because the remote delivered them
within IMPORT_PIN (#1008). Included in entries_pinned.
evict_write_ms: u64Time spent in the eviction writes themselves, each entry’s removal
with its busy waits, summed over the run. Next to entries_locked it
shows how much of a sweep went to waiting on builds for the index
write lock.
bytes_held: u64Bytes a size-driven sweep found held by live files outside the store: last-reference blobs a target directory still clones or hardlinks. Evicting them frees nothing, so the sweep leaves them out of the bytes it has to free (kunobi-ninja/kache#1206).
housekeeping: Option<HousekeepingStats>What the run’s housekeeping did. None for a run that did none, such
as the eviction after an upload.