Skip to content

Deferred updates by filter - #8485

Merged
agourlay merged 2 commits into
devfrom
deferred-updates-by-filter
Mar 24, 2026
Merged

agourlay merged 2 commits into
devfrom
deferred-updates-by-filter

Conversation

@IvanPleshkov

Copy link
Copy Markdown
Contributor

This PR extends #8389 and applies such an idea to all updates by filter, not only deletion by filter

coderabbitai[bot]

This comment was marked as resolved.

@qdrant qdrant deleted a comment from coderabbitai Bot Mar 23, 2026

@timvisee timvisee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for all the tests.

I like that we extracted the existing selection logic for deletions into a reusable function.

Comment thread lib/shard/src/update.rs Outdated
let present: Vec<_> = all_matched_points
.iter()
.copied()
.filter(|point_id| segment.has_point(*point_id))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we maybe already filter out points_to_keep here, instead of using .retain() below?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@JojiiOfficial
JojiiOfficial force-pushed the deferred-updates-by-filter branch from d9aefe4 to 78d693d Compare March 24, 2026 09:26
@coderabbitai

coderabbitai Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4a685d38-6fac-4a60-935f-53468a28ef3c

📥 Commits

Reviewing files that changed from the base of the PR and between d9aefe4 and 78d693d.

📒 Files selected for processing (1)
  • lib/shard/src/update.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • lib/shard/src/update.rs

📝 Walkthrough

Walkthrough

This PR refactors deferred point handling in filtered operations within lib/shard/src/update.rs. It introduces a new helper function deferred_points_to_exclude_by_filter() to compute point IDs to exclude when deferred versions are newer than filter-matched versions. The delete_points_by_filter() function is refactored to use this helper and expand deletion targets across segments while preserving specified points. Similarly, points_by_filter() is refactored to build per-segment point tracking and conditionally exclude deferred points. Test coverage is expanded with five new test cases validating deferred corner-case behavior across multiple filtered payload and vector operations.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested reviewers

  • timvisee
  • agourlay
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Deferred updates by filter' directly describes the main change: extending deferred update handling to all filter-based operations, not just deletions.
Description check ✅ Passed The description references PR #8389 and clearly states the changeset extends deferred update logic from deletion to all updates by filter, matching the implementation changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deferred-updates-by-filter

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@agourlay
agourlay merged commit 81f53c9 into dev Mar 24, 2026
15 checks passed
@agourlay
agourlay deleted the deferred-updates-by-filter branch March 24, 2026 10:59
generall pushed a commit that referenced this pull request Mar 26, 2026
* deferred updates by filter

* Don't use points.retain()

---------

Co-authored-by: jojii <[email protected]>
KShivendu pushed a commit that referenced this pull request Mar 30, 2026
* deferred updates by filter

* Don't use points.retain()

---------

Co-authored-by: jojii <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants