mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
774dee54034305260c1faecc0968c3914f0ef99f
codex01's AMEND on #134 (three P2s; the disarm policy is unchanged): 1. Only a ready fact for the watched primary epoch clears or disarms the watchdog. The full promotion fact is passed and its epoch is compared with the watched epoch under the watchdog lock, so an engine still ready at an older epoch (its new assignment refused at admission) cannot disarm the new assignment, and an assignment that advances while the fact is read is not cleared by it. 2. The G1 role-admission latch of a primary-assigned replica is checked before readiness: it reports role_admission_failed for as long as it holds, whatever an older engine-ready fact says. 3. Health events come from the accepted store mutation itself: ObservationStore.IngestWithHealthTransitions returns, under the store lock, each slot whose unhealthy reason the accepted report changed against the same server's previously stored fact. A refused report yields none and expiry never fabricates a clear. The master ingests and records those events under healthMu, so events follow accepted order across concurrent heartbeats. Lock order: healthMu -> store.mu (released inside ingest) -> event ring; nothing else takes healthMu, and neither the store nor the ring calls back into the host. The watchdog keeps its own mutex and calls nothing while holding it. Refs #128 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Languages
Go
84.6%
Rust
7.8%
Shell
2.7%
templ
1.6%
Java
1%
Other
2%