mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
3de728e23dfe87e52403246cd4e48fb3cde7b668
A detach whose final cut provably did not publish resumes serving, but the stop-pending mark set at the start of the detach stayed latched on the host and on its lease guard, so a host that kept serving renewed about four times a second for good instead of once per renewal delay. The detach hook now returns an attempt token, and the provider calls a second hook with that token only after it resumed serving on a proven abort. The host clears stop-pending, on itself and on its guard, only for the latest attempt, so an older attempt's resume cannot clear a newer pending detach; an applied, fenced or unknown outcome keeps it. Tests: the guard's sleep is now observable through a scheduling seam, so the cadence test asserts the delay chosen after each renewal and the kick path separately, with no wall-clock window; the detach hook is witnessed before the drain starts; test workers are joined, bounded and failing on timeout, before their providers are closed. The invariants document gains the StopPending mode of the lease guard (scheduling only, no admission or ACK change) and INV-WS-STOP-PENDING-001. Comments now say that 250 ms bounds the sleep after a completed renewal, not the time from a revocation to its ACK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Languages
Go
84.5%
Rust
7.9%
Shell
2.7%
templ
1.6%
Java
1%
Other
2%