Fix WAL replay dropping points after delete_named_vector - #9105
Merged
Conversation
This was referenced May 20, 2026
agourlay
force-pushed
the
delete-vector-name-wal-replay-repro
branch
from
June 3, 2026 14:36
eb00e92 to
fecf8e0
Compare
agourlay
marked this pull request as ready for review
June 3, 2026 15:31
timvisee
reviewed
Jun 4, 2026
Co-authored-by: Tim Visée <tim+github@visee.me>
agourlay
force-pushed
the
delete-vector-name-wal-replay-repro
branch
from
June 8, 2026 15:56
f67b285 to
c8b4f2c
Compare
timvisee
reviewed
Jun 9, 2026
timvisee
approved these changes
Jun 9, 2026
generall
pushed a commit
that referenced
this pull request
Aug 4, 2026
* WAL replay reproducer for delete_named_vector * fix * Update lib/shard/src/operations/mod.rs Co-authored-by: Tim Visée <tim+github@visee.me> * add vector name created * track best-effort behavior --------- Co-authored-by: Tim Visée <tim+github@visee.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An Upsert sitting in unflushed WAL when
delete_named_vector(X)is called still referencesX.On reopen, WAL replay rejects it (
Not existing vector name error: X) and the target point is lost.Fix: in
LocalShard::load_from_wal, strip references to vector names not in the current collection config before applying each replayed op (CollectionUpdateOperations::retain_vector_names).The point survives with its remaining vectors, matching live behavior.
Tests (
lib/collection/src/tests/delete_vector_name_replay.rs):delete_named_vector_then_reload_loses_points— the repro; now passes with the fix.delete_named_vector_after_flush_survives_reload— flushing before the delete already closed the window.repeated_create_then_delete_vector_name_with_flush_survives_reload— the bug is the unflushed-Upsert variant, not any Create+Delete cycle.Adds a
#[cfg(test)]helperforce_flush_local_for_testonShardReplicaSet.Note: scoped to the optimizer-off WAL-replay path. The optimizer-on proxy-segment schema race is separate and not addressed here.