mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
* volume: report the encode run in VolumeEcShardsInfo Go and Rust volume servers now fill EcShardConfig.encode_ts_ns from the mounted EC volume's .vif, next to the block layout they already report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * erasure_coding: keep the source when holders serve different encode runs VerifyShardsAcrossServers records each holder's encode run, and RequireAgreedEncodeRun fails when holders that report one disagree. The encoder checks it before deleting the source volume, so a shard set that only looks complete by shard ids does not replace the source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * erasure_coding: refuse a holder that reports more than one encode run A holder whose disks serve shards of different encode runs reports MixedEncodeRuns, and RequireAgreedEncodeRun fails on it even when no other holder answers or every other holder agrees on one run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * volume: report mixed encode runs across local disks in VolumeEcShardsInfo The reply listed shards from every disk under the first disk's encode run. When the shard-bearing disks of a volume hold different nonzero runs, Go and Rust volume servers now report MixedEncodeRuns instead, so the source-deletion check sees the conflict. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * volume: refuse an EC shard copy of another encode run than the mounted one VolumeEcShardsCopy committed the copied .vif and reopened replaced shards without updating the mounted volume's encode run, so the holder kept reporting the old run while serving the new bytes. Go and Rust volume servers now stage the .vif before anything is committed and fail with FailedPrecondition when it names a nonzero run different from a run this server mounts for the volume. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * volume: list only mounted shards of every disk in Rust VolumeEcShardsInfo The Rust reply listed every shard slot of the first disk's runtime, with unmounted slots as size-0 entries, and skipped shards mounted on other disks. Callers build each holder's shard bits from this list, so a Rust holder counted as holding shards it did not have. The reply now lists the mounted shards of every local disk, each id once, as Go does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * volume: check the source encode run of an EC shard copy without a .vif A copy that leaves out the .vif could still replace a mounted shard with another encode run's bytes. Fetch the source .vif for the run check in every copy, and install it only when asked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * volume: refuse to serve EC files of a volume held from two encode runs CopyFile looks each requested file up on its own, so a server that holds a volume's shards on one disk from one encode run and its .vif on another disk from a different run would hand a copier mismatched files. Refuse the copy when the .vif files of this server disagree on a nonzero run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ec: refuse a rebuild whose holders serve different encode runs The rebuild groups holders by volume id and collection only. When they serve two encode runs, the copied shards land beside the first run's .vif and .ecx and the rebuild regenerates from the mixed set. Before copying, ask every holder for its run and refuse unless they agree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ec: bound each holder query in the rebuild's encode-run check A holder that accepts the connection but never answers VolumeEcShardsInfo kept the rebuild waiting forever. Give each holder its own deadline; one that times out is skipped like an unreachable holder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ec: check only the rebuilder and copy sources for the encode run The rebuild copies each shard from its first listed holder. Extra copies are never read, so asking them for their run only adds servers that can stall the check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ec: do not copy from a source whose encode run went unchecked A copy source whose VolumeEcShardsInfo query fails or times out has an unknown run. The copy fence on the rebuilder compares a source's run with the run the rebuilder mounts, so on a rebuilder that holds none of the volume's shards nothing checks it, and its shards could join a rebuild of another run. The rebuild now skips such a source like a failed copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ec: leave holders of shards the rebuilder has out of the run check The rebuild uses a shard the rebuilder already holds and never reads its other listed holders, but the run check still asked the first of them. A stale replica listed first for such a shard refused a rebuild that would not touch it. Pick the holders to check the way prepareDataToRecover picks its copy sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Volume Server Integration Tests
This package contains integration tests for SeaweedFS volume server HTTP and gRPC APIs.
Run Tests
Run tests from repo root:
go test ./test/volume_server/... -v
If a weed binary is not found, the harness will build one automatically.
Optional environment variables
WEED_BINARY: explicit path to theweedexecutable (disables auto-build).VOLUME_SERVER_IT_KEEP_LOGS=1: keep temporary test directories and process logs.
Current scope (Phase 0)
- Shared cluster/framework utilities
- Matrix profile definitions
- Initial HTTP admin endpoint checks
- Initial gRPC state/status checks
More API coverage is tracked in /Users/chris/dev/seaweedfs2/test/volume_server/DEV_PLAN.md.