mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
3ebc6f15c2e9a5190429cc9c5084d85ea36bd62b
Adds Receiver.appliedWalLSN/recvFromLSN tracking and checkMonotonic / enforceWalWireMonotonic per §IV.0 T4 (recover-semantics-adjustment-plan §7 v3.28 substrate-mode carve-out). Behavior: - SessionStart seeds recvFromLSN=appliedWalLSN=FromLSN. - Each frameWALEntry runs enforceWalWireMonotonic before ApplyWALEntry. - RecoveryModeWALReplay: requires lsn == appliedWalLSN+1; gap returns FailureContract; exact-duplicate / backward returns FailureProtocol. - StateConvergence (smartwal ScanLBAs): skipped — frontier LSN may legitimately repeat across many RecoveryEntry payloads. Tests: - TestReceiver_checkMonotonic_T4: forward / duplicate / gap / backward. - TestReceiver_checkMonotonic_boundaryDup: lsn==FromLSN before any apply is a Protocol failure (not a no-op). Authored by architect; submitted on user request. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Languages
Go
84.6%
Rust
7.8%
Shell
2.7%
templ
1.6%
Java
1%
Other
2%