pingqiuandClaude Opus 5.5 1ec7b9975b chunkstore, storage: snapshot catalog, fork, detached HEAD and Detach
Control-plane metadata and operations over the filer (B9 W2 spec §3-§5):

- Catalog (core/frontend/chunkstore/catalog.go):
  - VOLUME entry <base>/<vol>/VOLUME: identity, geometry, origin and
    parent, write-once. EnsureVolume applies the attach rules (create a
    missing one; geometry_mismatch; fork_incomplete for a fork without
    HEAD).
  - CreateSnapshot stores the HEAD a cut installed as snaps/<name>
    (o_excl; the same request id replays, another is snapshot_exists),
    under an intent naming its keys until the entry is written, and
    refuses the write past OpDeadline.
  - ListSnapshots pages in name order (deleting ones hidden unless asked);
    DeleteSnapshot only marks deleting (conditional on state and gen);
    ListVolumes lists volume directories for GC.
  - Fork: VOLUME (origin fork, parent) then HEAD at gen 1, epoch 0, no
    holder, the snapshot's remote_lsn (LSNs carry forward), every ref
    owner-qualified as "@<owner>/<key>" (an already qualified ref keeps
    its owner), under an intent on the target; replays by request id.
  - Typed errors with the spec's codes (CatalogError, CodeOf).
- HEAD gains Detached (JSON "detached", omitted when false). The chunk
  layer's Detach takes a final cut, then CASes the same image once more
  with Detached set; afterwards cuts are refused (ErrChunkLayerDetached)
  and a repeated Detach returns the first result. A normal cut always
  publishes Detached = false.

No entry carries filer chunks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 04:20:41 -08:00
Languages
Go 84.6%
Rust 7.8%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%