Skip to content

feat: wire up read only field indexes - #9224

Merged
dancixx merged 6 commits into
devfrom
feat/readonly-fieldindex-open
Jun 3, 2026
Merged

dancixx merged 6 commits into
devfrom
feat/readonly-fieldindex-open

Conversation

@dancixx

@dancixx dancixx commented May 28, 2026

Copy link
Copy Markdown
Contributor

All Submissions:

⚠️ PRs must target the dev branch. If your PR targets master, please change the base branch to dev before requesting a review.

  • My PR targets the dev branch (not master) and my branch was created 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 --workspace --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?

@coderabbitai

coderabbitai Bot commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds ReadOnlyFieldIndex::open that maps FullPayloadIndexType.storage_type to appendable vs immutable read modes and dispatches per PayloadIndexType to per-index read-only open functions (map, numeric, geo, full-text, bool, null), converting payload schema to TextIndexParams for full-text and forwarding total_point_count for null. Introduces a lifecycle submodule, exposes index-directory helpers as pub(crate), implements Debug for ReadOnlyFieldIndex, and adds lifecycle/introspection methods (files, immutable_files, ram_usage_bytes, is_on_disk, populate, clear_cache, get_full_index_type) as match-based skeletons; many arms remain todo!.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • qdrant/qdrant#9222: Adds ReadOnlyFullTextIndex read-only open constructors used by this PR's full-text dispatcher path.
  • qdrant/qdrant#9213: Implements read-only numeric index open methods that the dispatcher delegates to.
  • qdrant/qdrant#9197: Adds ReadOnlyNullIndex open constructor relied upon by the null-arm dispatch.

Suggested reviewers

  • generall
  • coszio

Poem

🐇 I hopped through dirs and matched each kind,
I opened mmap and gridstore in my mind,
Debug shows my variant — neat and small,
Introspection waits till todos fall,
A carrot for code that stitches all.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description consists of the repository's contribution template/checklist with no actual implementation details or rationale provided for the specific changes in this PR. Add a brief description explaining what changes were made and why, beyond just the contribution checklist (e.g., mention the ReadOnlyFieldIndex::open dispatcher and motivation).
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: wire up read only field indexes' accurately describes the main change: implementing the open lifecycle dispatcher for read-only field indexes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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.

@generall generall added this to the Live-reload milestone May 30, 2026
@dancixx
dancixx force-pushed the feat/readonly-map-index-open branch 2 times, most recently from e0912f1 to 38549c9 Compare June 2, 2026 08:59
Base automatically changed from feat/readonly-map-index-open to dev June 2, 2026 11:56
@dancixx
dancixx force-pushed the feat/readonly-fieldindex-open branch from b7be54c to 4ce96c0 Compare June 2, 2026 18:37
@dancixx
dancixx marked this pull request as ready for review June 3, 2026 08:02
@dancixx
dancixx force-pushed the feat/readonly-fieldindex-open branch from 6c65256 to 069bd45 Compare June 3, 2026 08:07
@dancixx
dancixx requested a review from generall June 3, 2026 09:04
Merge ReadOnlyFieldIndex::open_gridstore/open_mmap into a single `open`
that picks the appendable vs immutable path from the stored
FullPayloadIndexType::storage_type. The choice is modeled as a ReadMode
(Appendable/Immutable) rather than a concrete backend, since the
read-only stack is generic over UniversalRead and mmap is now just one
implementation of it.

Also remove the unsupported RocksDb variant from payload_config's
StorageType and its now-dead match arms.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@dancixx
dancixx merged commit c0345c3 into dev Jun 3, 2026
15 checks passed
@dancixx
dancixx deleted the feat/readonly-fieldindex-open branch June 3, 2026 13:01
timvisee pushed a commit that referenced this pull request Jun 3, 2026
* feat: wire up read only field indexes

* feat: add missing indexes

* feat: add try_from impl for TextIndexParams

* refactor: unify read-only field index open and drop RocksDB storage

Merge ReadOnlyFieldIndex::open_gridstore/open_mmap into a single `open`
that picks the appendable vs immutable path from the stored
FullPayloadIndexType::storage_type. The choice is modeled as a ReadMode
(Appendable/Immutable) rather than a concrete backend, since the
read-only stack is generic over UniversalRead and mmap is now just one
implementation of it.

Also remove the unsupported RocksDb variant from payload_config's
StorageType and its now-dead match arms.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* fix: linter

* fix: linter

---------

Co-authored-by: generall <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants