Skip to content

Allow payload operations on dummy shard#7521

Merged
ffuugoo merged 3 commits intodevfrom
dummy-shard-allow-payload-ops
Nov 13, 2025
Merged

Allow payload operations on dummy shard#7521
ffuugoo merged 3 commits intodevfrom
dummy-shard-allow-payload-ops

Conversation

@ffuugoo
Copy link
Contributor

@ffuugoo ffuugoo commented Nov 12, 2025

Payload ops are applied as consensus operations, which leads to crash loop on dummy shards.

We rebuild payload indices when loading LocalShard, and to switch from DummyShard to LocalShard we have to load the LocalShard from disk, so it should be safe-enough to allow dummy shards to "ignore" payload operations.

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --all --all-features command?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@ffuugoo ffuugoo requested a review from timvisee November 12, 2025 11:46
@ffuugoo ffuugoo marked this pull request as ready for review November 12, 2025 12:19
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2bc9050 and d17fb82.

📒 Files selected for processing (1)
  • lib/collection/src/shards/dummy_shard.rs (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.rs

📄 CodeRabbit inference engine (.github/review-rules.md)

**/*.rs: Prefer explicit SomeType::from(x) over implicit x.into() in Rust code
Do not use transmute_from_u8, transmute_to_u8, transmute_from_u8_to_slice, transmute_from_u8_to_mut_slice, transmute_to_u8_slice in new code; use bytemuck or zerocopy instead

Files:

  • lib/collection/src/shards/dummy_shard.rs
**/src/**/*.rs

📄 CodeRabbit inference engine (.github/review-rules.md)

**/src/**/*.rs: Prefer exhaustive match arms over a catch-all _ arm to avoid missing new enum variants (except in tests/benchmarks or when provably safe)
Prefer explicit field ignoring with : _ over .. in struct patterns (except in tests/benchmarks or when provably safe)

Files:

  • lib/collection/src/shards/dummy_shard.rs
🧠 Learnings (1)
📚 Learning: 2025-08-10T18:30:02.986Z
Learnt from: generall
Repo: qdrant/qdrant PR: 7006
File: lib/collection/src/operations/verification/update.rs:158-174
Timestamp: 2025-08-10T18:30:02.986Z
Learning: In Qdrant's strict mode verification code (lib/collection/src/operations/verification/update.rs), exhaustive pattern matching without `..` is intentionally used for structs like PointsBatch and PointsList. This design pattern ensures compilation fails when new fields are added, forcing developers to explicitly consider how new fields should be handled in the indexed_filter_write method. This provides visibility and compile-time safety for struct evolution.

Applied to files:

  • lib/collection/src/shards/dummy_shard.rs
🔇 Additional comments (2)
lib/collection/src/shards/dummy_shard.rs (2)

15-15: LGTM!

The import is necessary for matching on operation types in the update method.


24-24: LGTM!

The UpdateStatus import is required for constructing the UpdateResult with UpdateStatus::Acknowledged.

@qdrant qdrant deleted a comment from coderabbitai bot Nov 12, 2025
Co-authored-by: Tim Visée <tim+github@visee.me>
@qdrant qdrant deleted a comment from coderabbitai bot Nov 13, 2025
@timvisee timvisee added the release:1.16.0 Pull requests that should be merged for the Qdrant 1.16.0 release. label Nov 13, 2025
- use explicit match
- improve comment
@ffuugoo ffuugoo requested a review from generall November 13, 2025 16:39
@coderabbitai

This comment was marked as resolved.

@ffuugoo ffuugoo merged commit 80ae57f into dev Nov 13, 2025
16 checks passed
@ffuugoo ffuugoo deleted the dummy-shard-allow-payload-ops branch November 13, 2025 17:31
timvisee added a commit that referenced this pull request Nov 14, 2025
Co-authored-by: Tim Visée <tim+github@visee.me>
@timvisee timvisee mentioned this pull request Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:1.16.0 Pull requests that should be merged for the Qdrant 1.16.0 release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants