Browse Source
Concurrent WriteLBA/Trim calls could deliver WAL entries to replicas out of LSN order: two goroutines allocate LSN 4 and 5 concurrently, but LSN 5 could reach the replica first via ShipAll, causing the replica to reject it as an LSN gap. shipMu now wraps nextLSN.Add + wal.Append + ShipAll in both WriteLBA and Trim, guaranteeing LSN-ordered delivery to replicas under concurrent writers. The dirty map update and WAL pressure check happen after shipMu is released — they don't need ordering guarantees. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>feature/sw-block
1 changed files with 16 additions and 0 deletions
Loading…
Reference in new issue