mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-02 06:07:24 +00:00
Fix recover path TOCTOU: re-Lookup after AddReplica so the primary refresh assignment includes the freshly added replica addresses. Previously, Lookup (copy) was called before AddReplica modified the registry, so entry.Replicas was empty → primary got replicas=0 → shipper never configured. Add 2 WAL pressure edge case tests: - ShipperCatchUpOrEscalate: 64KB WAL, 200 writes, aggressive flusher. Proves no hang/deadlock/corruption. Shipper either keeps up or correctly escalates to NeedsRebuild. - RebuildWithPinWhilePrimaryWrites: rebuild session active while primary writes 7600+ blocks in 2s. Proves primary never freezes — rebuild pin is on replica only, primary WAL recycles freely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>