mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
4e5ff2cc95ab72a3a4ac84951a11ddc555297c79
claude05's rulings (2026-11-15 22:53Z). Retention, policy on the VOLUME entry: keep the newest KeepNewest unpinned snapshots, every pinned snapshot not yet past its ExpiresAtNs, every snapshot younger than KeepYounger (a future creation time from clock skew counts as young), the newest snapshot of each of the last KeepHourly / KeepDaily / KeepWeekly periods, and every snapshot a fork still needs (named by a fork whose HEAD is absent or aborted). Everything else is deleted through DeleteSnapshot (attempt-scoped tombstones; HEAD untouched; names freed); GC reclaims the chunks. Equal creation times rank by name. Semantic and labeled snapshots are not exempt; a pinned snapshot past its expiry is unpinned. Defaults: 10 newest, 1h. A dry run plans and writes nothing. The policy is stored as extended attributes on the VOLUME entry, conditional on a revision. Accounting, from manifests and filer listings (no data reads; a chunk is ChunkBlocks x BlockSize, the last clipped): live bytes from HEAD; per-snapshot exclusive bytes (referenced by no other holder); stored bytes from the volume's chunk-key bindings, exact for referenced keys and a full chunk (an upper bound, flagged) for the rest. The unreferenced-not-yet-collected bytes come from GC's preview once #140 merges; bytes uploaded since creation need a counter (follow-up). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Languages
Go
84.5%
Rust
7.9%
Shell
2.7%
templ
1.6%
Java
1%
Other
2%