mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-07 02:20:55 -05:00
The WAL delta manual recovery tests SIGKILL the uploader python process and then SIGKILL the qdrant peer. If the uploader's last HTTP upsert was still in-flight when the peer dies, the peer may have partially replicated the batch — some replicas get it, some don't — and the peer dies before it can mark the lagging replicas Dead. That divergence persists across the subsequent recovery chain, because the untouched replicas never participate in any transfer. Observed as `test_shard_wal_delta_transfer_manual_recovery_chain` failing with "Data on all nodes should be consistent": peer_0_1 had batch 500006-500008 (forwarded by peer_5 pre-kill), peer_0_0 did not, and neither peer was a source or destination of any transfer, so the gap was never reconciled. Fix: give the uploader loop a `stop_event` that it checks between upserts. Add `stop_update_process` helper that sets the event, joins the process, and only SIGKILLs as a timeout fallback. Use it before every `processes.pop().kill()` so no upsert is in-flight when the peer dies. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>