mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 18:47:20 +01:00
2b6ce9b2026d2296635ef1b880548ecdf0206d87
OnProbeResult routes ProbeSucceeded + RecoveryFactsObserved from the same probe through applyBatchAndExecute, so both enter the engine under one lock hold — no unrelated event can interleave between them. Shared bookkeeping lives in applyEventLocked; both the batch and single-event paths go through it, so the trace / projection / command accumulators can't drift again. ApplyLog returned from OnProbeResult is now complete (EventKind, full Trace including session events, post-session Projection). An ingress rule is pinned in code: multi-fact observations MUST route through applyBatchAndExecute, and any new multi-fact ingress needs its own contention test. Tests: - TestBatch_UsesBatchPath: EventKind prefix, both event markers in Trace, Projection reflects post-apply state - TestBatch_LogIncludesSessionEvents: SessionPrepared/Started markers present in returned log.Trace - TestBatch_AtomicUnderContention: 4 goroutines fire competing events while main fires 2000 probes; scans trace event markers to prove ProbeSucceeded is always immediately followed by RecoveryFactsObserved. Vacuity guard requires real contention.
Languages
Go
84.7%
Rust
7.7%
Shell
2.7%
templ
1.5%
Java
1%
Other
2.1%