mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
616583fc38d3c5b735b110ee93e7073fd4e73d92
Slice A (mechanical, dead-code removal):
- NewSenderWithSink panics on nil sink (was: silent promote to legacy)
- NewSender → private newSender (only used by sink-installing
constructors as builder)
- Run() drops the `if s.sink != nil { ... } else { legacy }` split;
sink path is unconditional. INV-NO-DOUBLE-LIVE at recovery layer
is now a structural guarantee (one emit path, not a runtime check)
- TryAdvanceToSteadyLive call site removed (kickoff Q3 collapsed
Phase enum to {Idle, Active}; barrier-ack is the completion
signal)
Kept for slice B per architect framing:
- Close, drainAndSeal, liveQueue, sealed, closeCh, queueMu, walItem
- PushLiveWrite (still feeds session-lane tails until live writes
route through WalShipper.NotifyAppend)
- streamBacklog (called by senderBacklogSink.DrainBacklog)
Tests:
+ TestNewSenderWithSink_NilSinkPanics — locks sink-mandatory contract
- TestSender_NoSink_FallsBackToLegacyBehavior — replaced by panic test
go test ./core/recovery/ ./core/transport/ — all PASS.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Languages
Go
84.5%
Rust
7.9%
Shell
2.7%
templ
1.6%
Java
1%
Other
2%