You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GC's completion log reports retained_count as the retention target, not the versions left #2163
P3Backlog: valid, low payoff-per-effortarea:storageStorage backends, nameservice, ledger lifecycle, index storage, cachesbugSomething isn't working as expected
At the end of a pass, clean_garbage logs "Garbage collection complete" with retained_count = keep_count (fluree-db-indexer/src/gc/collector.rs:633). keep_count is 1 + max_old_indexes (:430), which is 6 with the defaults on every pass. It is the retention target, not a count of anything.
The real number is usually much larger:
The walk (:454) runs oldest-first.
It stops at the first garbage record younger than min_time_garbage_mins (load_manifest_nodes, :225).
Every version newer than that point survives.
Under frequent builds, that is far more than keep_count.
The chain length only appears in a debug! line (:419). So an operator sees retained_count=6 at info level while storage holds dozens of versions. That is how this was reported.
A second gap makes the same state invisible from the other direction. The info line is skipped when nothing was collected (:624). A ledger whose every pass is stopped by the age guard therefore logs nothing at default level.
Line numbers are on main at aa9aa7acd. On next the log line is at collector.rs:620, and the logic is the same.
Fix
Log the versions actually left after the pass, retained: the chain length minus indexes_cleaned.
Log the target separately, as retention_target.
Add retained to CleanGarbageResult (gc/mod.rs:218).
Emit the line, or a debug! → info! counterpart, when the age guard stopped the walk with versions past the target, and include the count past the target.
P3Backlog: valid, low payoff-per-effortarea:storageStorage backends, nameservice, ledger lifecycle, index storage, cachesbugSomething isn't working as expected
Activity