mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
cd1555b7050de0d22244530461b144f98a13277e
* storage: bound flusher snapshot to published LSN cut * storage: make checkpoint snapshot atomic with write publication * transport: close the replica connection when ApplyEntry fails (#89) The production replica listener (no apply hook) only logged a failed store.ApplyEntry and kept reading. Later entries on the same connection were still applied, so the next barrier acked a frontier past the LSN that was never applied. walstore's ApplyEntry can fail when its WAL is full, and the primary only checks that AchievedLSN reaches the target, so the gap went unnoticed. A failed apply now ends the connection, as the apply-gate path already does. Nothing after the failed LSN is applied on that connection, and the primary sees the close, marks the peer degraded and recovers it from the replica's real frontier. The new test ships LSNs 1, 2 and 3 with LSN 2 failing and checks that no barrier, on the same connection or a fresh one, acks LSN 2 or later. It fails before this change (the barrier acks 3) and passes after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: prove the failed apply, the close and the primary's recovery (#89) The replica test now waits for the injected ApplyEntry(2) failure, requires the failed connection to end with EOF or a reset (a timeout fails), and checks that LSN 3 never reaches the store. A new component test runs the production primary path with the host's PeerAdapterRegistry and probe loop: a transient replica apply failure degrades the peer, recovery replays from the replica's frontier starting exactly at the failed LSN with exact bytes, the peer returns to healthy, and a later write and barrier succeed. Without the fix the peer is never degraded and the failed block stays missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Languages
Go
84.6%
Rust
7.8%
Shell
2.7%
templ
1.6%
Java
1%
Other
2%