pingqiuandClaude Opus 5.5 2ef8b82c2d chunkstore: SeaweedFS remote for the walstore chunk layer
ChunkRemote implements storage.ChunkRemote over the imported Filer and
Blobs client. Under one volume's filer directory, HEAD is an entry whose
content is the JSON HEAD and whose extended attributes mirror
{gen, epoch, holder}; each chunk key is a write-once entry (exclusive
create) naming the needle that holds the chunk's bytes, because the
layer names chunks itself while SeaweedFS assigns needle ids.

The HEAD CAS is UpdateEntry with expected_extended {gen, epoch}; the
first HEAD is an exclusive create. Only definite refusals map to
ErrChunkHeadPrecondition; any other error is returned as is, so the
layer treats the outcome as unknown and re-reads HEAD. A proposal that
lowers the epoch is refused. A HEAD entry that exists but does not
decode, carries filer chunks, or whose attributes disagree with its
document is an error, never the absent HEAD. Needles are not reclaimed;
Delete reports ErrDeleteUnsupported.

Tests run against the in-memory fake filer and needle store, including
the chunk layer end to end (capture, then a fresh host reading lazily
from HEAD); an integration test (build tag chunkstore_integration) runs
the same against real weed master, volume and filer processes.

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