Files
qdrant/tests
Andrey Vasnetsov 8e90f58fa6 tests: stop uploader cleanly before killing peer in WAL delta tests (#8713)
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>
2026-04-20 16:30:34 +02:00
..
2026-04-20 15:48:39 +02:00
2026-04-14 12:37:31 +02:00
2026-04-20 11:27:32 +02:00
2024-07-08 18:17:43 +00:00