mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-05-23 18:21:28 +00:00
Bug: BarrierOK with FlushedLSN == 0 (legacy 1-byte response) was counted as successful sync_all durability even though no authoritative durable progress was established. This allowed a legacy replica to silently pass through the sync_all barrier without proving any LSN was fsynced. Fix (wal_shipper.go): BarrierOK with FlushedLSN == 0 now returns an error instead of nil. Barrier success requires the replica to report a non-zero FlushedLSN proving which LSN was durably persisted. This makes the code match the CP13-3 contract: replicaFlushedLSN is the sole authority for sync_all durability. New test: TestBarrier_LegacyResponseRejectedBySyncAll — proves legacy 1-byte responses don't establish durable authority. Contract review doc updated to reflect the code fix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>