Repository navigation
Universal MmapFile that can read any T - #8493
Merged
Merged
Conversation
ffuugoo
force-pushed
the
universal-mmap
branch
2 times, most recently
from
March 24, 2026 18:37
0ddda5a to
4ee42ef
Compare
ffuugoo
marked this pull request as ready for review
March 25, 2026 11:18
This comment was marked as resolved.
This comment was marked as resolved.
3 of 9 tasks
generall
reviewed
Mar 25, 2026
generall
reviewed
Mar 25, 2026
| @@ -1,5 +1,7 @@ | |||
| use std::path::{Path, PathBuf}; | |||
|
|
|||
| use super::*; | |||
Member
There was a problem hiding this comment.
glob imports are considered antipattern
xzfc
reviewed
Mar 25, 2026
Enforce read-only storage in `ImmutableDenseVectors` and `StoredPointToValues`
Enforce `MmapUniversalRo` to always be read-only
generall
approved these changes
Mar 25, 2026
ffuugoo
commented
Mar 25, 2026
7 of 9 tasks
generall
pushed a commit
that referenced
this pull request
Mar 26, 2026
KShivendu
pushed a commit
that referenced
this pull request
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement
MmapFilethat does not depend on generic parameterTand implementUniversalRead/UniversalWritefor "any"T(e.g., singleMmapFilecan readu8/f32/u64/etc).I've provided
MmapUniversal<T>re-implementation based onMmapFile, thought I plan to completely replace it withMmapFile(either in this, or in a follow-up PR).I've also added:
writeableflag toOpenOptionsfor runtime read/write control (e.g., similar tofs::OpenOptions::write)ReadOnlywrapper, that enforces I/O being read-onlywriteable == falseUniversalRead, but notUniversalWriteMy reasoning for this is:
MmapUniversalRo), we can as well specifywriteable: falseReadOnlywrapperReadOnlywrapper is an additional genericUniversalReadimplementationsAll Submissions:
devbranch. Did you create your branch fromdev?New Feature Submissions:
cargo +nightly fmt --allcommand prior to submission?cargo clippy --workspace --all-featurescommand?Changes to Core Features: