Files
seaweedfs/sw-block/prototype
pingqiu 46ef79ce35 fix: stable ServerID in assignments, fail-closed on missing identity, wire into ProcessAssignments
Finding 1: Identity no longer address-derived
- ReplicaAddr.ServerID field added (stable server identity from registry)
- BlockVolumeAssignment.ReplicaServerID field added (scalar RF=2 path)
- ControlBridge uses ServerID, NOT address, for ReplicaID
- Missing ServerID → replica skipped (fail closed), logged

Finding 2: Wired into real ProcessAssignments
- BlockService.v2Bridge field initialized in StartBlockService
- ProcessAssignments converts each assignment via v2Bridge.ConvertAssignment
  BEFORE existing V1 processing (parallel, not replacing yet)
- Logged at glog V(1)

Finding 3: Fail-closed on missing identity
- Empty ServerID in ReplicaAddrs → replica skipped with log
- Empty ReplicaServerID in scalar path → no replica created
- Test: MissingServerID_FailsClosed verifies both paths

7 tests: StableServerID, AddressChange_IdentityPreserved,
MultiReplica_StableServerIDs, MissingServerID_FailsClosed,
EpochFencing_IntegratedPath, RebuildAssignment, ReplicaAssignment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 10:46:17 -07:00
..

V2 Prototype

Experimental WAL V2 prototype code lives here.

Current prototype:

  • fsmv2/: pure in-memory replication FSM prototype
  • volumefsm/: volume-level orchestrator prototype above fsmv2
  • distsim/: early distributed/data-correctness simulator with synthetic 4K block values

Rules:

  • do not wire this directly into WAL V1 production code
  • keep interfaces and tests focused on architecture learning
  • promote pieces into production only after V2 design stabilizes

Windows test workflow

Because normal go test may be blocked by Windows Defender when it executes temporary test binaries from %TEMP%, use:

powershell -ExecutionPolicy Bypass -File .\sw-block\prototype\run-tests.ps1

This builds test binaries into the workspace and runs them directly.