Skip to content

use T in immutable_dense_vectors - #8472

Merged
generall merged 1 commit into
devfrom
fix-io-uring-reads-part-2
Mar 20, 2026
Merged

generall merged 1 commit into
devfrom
fix-io-uring-reads-part-2

Conversation

@generall

Copy link
Copy Markdown
Member

Second part of #8470

@generall
generall requested review from coszio and ffuugoo March 20, 2026 20:05
@coderabbitai

coderabbitai Bot commented Mar 20, 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: c3fbc694-a2da-4ef2-b462-1b571572b186

📥 Commits

Reviewing files that changed from the base of the PR and between 454f11b and 75f2bd3.

📒 Files selected for processing (3)
  • lib/segment/src/vector_storage/async_raw_scorer.rs
  • lib/segment/src/vector_storage/dense/dense_vector_storage.rs
  • lib/segment/src/vector_storage/dense/immutable_dense_vectors.rs

📝 Walkthrough

Walkthrough

This PR generalizes the generic bounds for vector storage components across three modules. The UniversalRead trait bound is changed from UniversalRead<u8> to UniversalRead<T> in AsyncRawScorerImpl, DenseVectorStorageImpl, and ImmutableDenseVectors, propagating the element type parameter instead of a fixed byte representation. Additionally, the raw_size() method is removed from ImmutableDenseVectors, and the vector reading logic is updated to use element-addressable reads directly instead of byte-level reads followed by unsafe casting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

chore

Suggested reviewers

  • ffuugoo
  • coszio
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: replacing hardcoded u8 with generic type T in immutable_dense_vectors and related storage components.
Description check ✅ Passed The description references the previous PR part, establishing context for this follow-up change to the vector storage type system.
Docstring Coverage ✅ Passed Docstring coverage is 84.62% 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 fix-io-uring-reads-part-2

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 merged commit 8733d9f into dev Mar 20, 2026
15 checks passed
@generall
generall deleted the fix-io-uring-reads-part-2 branch March 20, 2026 21:24
@coderabbitai coderabbitai Bot mentioned this pull request Mar 26, 2026
generall added a commit that referenced this pull request Mar 26, 2026
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