Use cluster default shard transfer method for fallback#9120
Merged
Conversation
When a WAL delta automatic transfer fails, the driver falls back to the method passed via `fallback_method`. This was hard-coded to `StreamRecords` (unless `prevent_unoptimized` was enabled), which is inconsistent with the 1.18.0+ default of `Snapshot` and ignores any configured `default_shard_transfer_method`. Use `Collection::default_shard_transfer_method()` instead, so the fallback matches the cluster default. With `prevent_unoptimized` we still pin to `Snapshot` to preserve deferred point state exactly (raw segment copy); stream_records would send deferred points but they would not be deferred on the target. Co-authored-by: Cursor <cursoragent@cursor.com>
If the cluster default transfer method is wal_delta, the same-method fallback would be refused by the driver. Use snapshot as a safe fallback in that case; snapshot is also the 1.18.0+ default. Update test_shard_wal_delta_transfer_fallback to assert the new snapshot fallback (was stream_records). Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
timvisee
approved these changes
May 21, 2026
generall
approved these changes
May 21, 2026
generall
pushed a commit
that referenced
this pull request
May 22, 2026
* Use cluster default shard transfer method for fallback When a WAL delta automatic transfer fails, the driver falls back to the method passed via `fallback_method`. This was hard-coded to `StreamRecords` (unless `prevent_unoptimized` was enabled), which is inconsistent with the 1.18.0+ default of `Snapshot` and ignores any configured `default_shard_transfer_method`. Use `Collection::default_shard_transfer_method()` instead, so the fallback matches the cluster default. With `prevent_unoptimized` we still pin to `Snapshot` to preserve deferred point state exactly (raw segment copy); stream_records would send deferred points but they would not be deferred on the target. Co-authored-by: Cursor <cursoragent@cursor.com> * Avoid wal_delta fallback, update fallback test If the cluster default transfer method is wal_delta, the same-method fallback would be refused by the driver. Use snapshot as a safe fallback in that case; snapshot is also the 1.18.0+ default. Update test_shard_wal_delta_transfer_fallback to assert the new snapshot fallback (was stream_records). Co-authored-by: Cursor <cursoragent@cursor.com> * Address clippy wildcard_enum_match_arm Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor Agent <agent@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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.
What
When a
WalDeltaautomatic transfer fails, the driver falls back to the method passed infallback_method(seetransfer_shard_fallback_defaultinlib/collection/src/shards/transfer/driver.rs). Until now this was hard-coded inCollection::send_shardto:This is inconsistent with the change in #8784 that made
Snapshotthe default transfer method for Qdrant 1.18.0+, and it also ignores any cluster-leveldefault_shard_transfer_methodoverride. As a result, when a WAL delta auto-recovery fails (e.g.recovery point has no clocks to resolve delta for), users on a clean 1.18 install see:…even though the cluster default is
Snapshot.Change
Use
Collection::default_shard_transfer_method()for the fallback. This returns the configureddefault_shard_transfer_methodorSnapshotfor 1.18.0+.prevent_unoptimizedstill pins toSnapshotto preserve deferred point state exactly (raw segment copy);StreamRecordswould send deferred points but they would not be deferred on the target.The existing safety in
transfer_shard_fallback_defaultalready refuses to fall back to the same method, so the case ofWalDelta→ fallbackWalDeltais correctly handled (it aborts the fallback).Test plan
Snapshot(or the configured default) instead ofStreamRecordsAll Submissions:
devbranch.Made with Cursor