mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 18:47:20 +01:00
f5c557074dd863b9696e3bd95fadb89e1a336dd4
Addresses three architect review rounds on T1 frontend contract:
Round 1 (L0/L1 only) → Round 2 (real adapter path + product loop):
- AdapterProjectionView reads engine.ReplicaProjection.Mode
(engine.ModeHealthy is the real readiness source, not
manufactured AssignmentInfo receipt)
- HealthyPathExecutor drives engine through Probe + Fence +
PublishHealthy so Mode actually reaches ModeHealthy
- cmd/blockvolume: --t1-readiness + --status-addr flags;
volume.StatusServer exposes frontend.Projection over HTTP
- memback negative offset: returns ErrInvalidOffset, no panic
- Boundary guard: full AST parse + alias resolution
Round 3 (cross-replica supersede + real authority move in L2):
- SupersedeProbe seam on AdapterProjectionView; Host.IsSuperseded
compares lastOther (replicaId, epoch, ev) vs self-lineage →
Healthy=false when another replica holds newer authority
- L2 now drives a product-route authority move: r1 restarts
with new data/ctrl addrs → master mints IntentRefreshEndpoint
→ EndpointVersion advances → old backend ErrStalePrimary →
fresh Open captures new lineage
- StatusServer restricted to loopback (bind + client check)
Round 4 (proof coverage + robustness):
- Real Host.recordOtherLine → IsSuperseded → View integration
test (no more stubProbe-only coverage for supersede claim)
- L2 closure claim sharpened: PROVES IntentRefreshEndpoint
stale reject; DOES NOT PROVE cross-replica primary change
(deferred to T6/G8)
- Reserve loopback port via :0 instead of hardcoded 7165
- Boundary guard: forbid dot-import of core/adapter and
core/authority (bare-literal bypass closed)
Tests (all green):
core/frontend L0: 7 + negative-offset regression + 3 meta
core/frontend L1: 1 (real adapter + AdapterProjectionView)
core/frontend L2: 1 (product route + authority move + stale
reject + new open, 17-21s)
core/host/volume: 4 AdapterProjectionView + 3 supersede
integration + 5 StatusServer loopback
Closure: INV-FRONTEND-001 / INV-FRONTEND-002 Unit+Component+
Integration; PCDD-STUFFING-001 Unit with dot-import guard.
Cross-replica primary-change facet explicitly remains
Unit/Component only (routed to G8/T6 for L2 promotion).
Languages
Go
84.7%
Rust
7.7%
Shell
2.7%
templ
1.5%
Java
1%
Other
2.1%