mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 10:37:23 +01:00
4f6d5c22e4c74fecbb6a19ed4364b5d50984003d
Architect code-review caught comment/code mismatch: docstring above drainOpportunity still said "Realtime mode: if cursor < head, scan to fill the gap" — but the implementation correctly returns early when mode != ModeBacklog (matches consensus §13 E-WALSHIPPER-DUAL- MODE / mini-plan §11.2a / T4a no-replay carve-out). Risk this doc-debt prevented: future contributor reads the stale comment, "fixes" the function to scan in Realtime, re-introduces the silent-divergence bug C2 closed (Realtime substrate scan would replay dead-window writes when peer comes back online). Comment now states the dual-mode contract explicitly with a DO-NOT-ADD-A-REALTIME-BRANCH warning citing §13 / T4a / CHK- WALSHIPPER-TIMER-DRAIN's ModeBacklog scope. No code logic change. go test all four packages — PASS.
Languages
Go
84.7%
Rust
7.7%
Shell
2.7%
templ
1.5%
Java
1%
Other
2.1%