Skip to content

use UniversalRead in ImmutableDenseVectors - #8210

Merged
coszio merged 3 commits into
devfrom
immutable-dense-vectors
Feb 24, 2026
Merged

coszio merged 3 commits into
devfrom
immutable-dense-vectors

Conversation

@coszio

@coszio coszio commented Feb 23, 2026 •

Copy link
Copy Markdown
Contributor

Builds on top of #8196

Refactors MmapDenseVectors to use a generic UniversalRead storage. By default still using mmap, but through MmapUniversal type.

By doing this, we are forced to rename it to something more appropriate, I propose ImmutableDenseVectors.

Future work

The current storage interface is made to work with slices everywhere, but UniversalRead works with Cow. What we probably want is a cow-like enum, which can handle either a slice (&[T]) or a boxed slice for the owned variant (Box<[T]>), which is a bit more lightweight than a Vec<T>.

@coszio
coszio requested review from ffuugoo, generall and xzfc February 23, 2026 20:49
pub fn open(
vectors_path: &Path,
deleted_path: &Path,
dim: usize,
with_async_io: bool,
madvise: AdviceSetting,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It also removes this propagated setting, which was actually set to AdviseSetting::Global everywhere

Base automatically changed from universal-io-mmap to dev February 24, 2026 10:55
@coszio
coszio force-pushed the immutable-dense-vectors branch from 3bdc57a to 8b45a20 Compare February 24, 2026 12:42
@coderabbitai

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@coszio
coszio force-pushed the immutable-dense-vectors branch from f760a1f to 8cc405e Compare February 24, 2026 13:41
@coszio
coszio merged commit e28543a into dev Feb 24, 2026
15 checks passed
@coszio
coszio deleted the immutable-dense-vectors branch February 24, 2026 16:55
@generall generall added this to the Universal IO milestone Mar 26, 2026
generall pushed a commit that referenced this pull request Mar 26, 2026
* use UniversalRead in ImmutableDenseVectors

...renamed from MmapDenseVectors

* remove madvise arg

* async_raw_scorer
@coderabbitai coderabbitai Bot mentioned this pull request Mar 29, 2026
KShivendu pushed a commit that referenced this pull request Mar 30, 2026
* use UniversalRead in ImmutableDenseVectors

...renamed from MmapDenseVectors

* remove madvise arg

* async_raw_scorer
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.

3 participants