feat(universal_io): MultiUniversalRead trait and VecMultiUniversalRead implementation#8255
Open
generall wants to merge 7 commits intotracker-universal-iofrom
Open
feat(universal_io): MultiUniversalRead trait and VecMultiUniversalRead implementation#8255generall wants to merge 7 commits intotracker-universal-iofrom
generall wants to merge 7 commits intotracker-universal-iofrom
Conversation
…lRead impl - Add SourceId, MultiUniversalRead<T> trait with read_batch_multi, source_len, populate, clear_ram_cache (latter two with default no-op). - Add UniversalIoError::InvalidSourceId for invalid source id in batch reads. - Add VecMultiUniversalRead<T, S>: minimal implementation over Vec<S: UniversalRead<T>> with attach(source) -> SourceId for adding sources at runtime. - Add test vec_multi_universal_read_batch_and_attach using MmapUniversal. - Handle InvalidSourceId in segment OperationError From<UniversalIoError>. Implements the interface and minimal mmap-based implementation from docs/design/multi-file-universal-io-plan.md (multi-source universal I/O). Made-with: Cursor
… drop plan from PR - Add universal_io/multi_universal_read.rs with SourceId, MultiUniversalRead, VecMultiUniversalRead and test; re-export from mod.rs. - Remove docs/design/multi-file-universal-io-plan.md from the branch. Made-with: Cursor
…tach, len, is_empty to trait - MultiUniversalRead: remove default impls for populate() and clear_ram_cache(); they are now required. - Add to trait: new(), len(), is_empty() (default), attach() (default Err). - Introduce associated type Source for attach; add AttachUnsupported<T> placeholder for impls that do not support dynamic attach. - VecMultiUniversalRead: type Source = S; implement all trait methods. - Re-export AttachUnsupported from universal_io. Made-with: Cursor
…all impls - Drop AttachUnsupported placeholder type and its UniversalRead/Send impls. - Make attach() a required method on MultiUniversalRead (no default). - Doc: all implementations must support attaching sources dynamically. - Remove AttachUnsupported from re-exports. Made-with: Cursor
…, add MultiUniversalWrite MultiUniversalRead: - Remove type Source; attach(path, options) opens by path and returns SourceId. - new(options: OpenOptions) for creating an empty multi-source view. - Move VecMultiUniversalRead to vec_multi_universal_read.rs. MultiUniversalWrite (new): - Trait: new(options), len(), is_empty(), attach(path, options), write_batch_multi((SourceId, offset, data)...), source_len, flusher(), populate(), clear_ram_cache(). - VecMultiUniversalWrite in vec_multi_universal_write.rs; flusher() runs all source flushers. Re-export MultiUniversalWrite, VecMultiUniversalWrite from universal_io. Made-with: Cursor
Make MultiUniversalWrite<T>: MultiUniversalRead<T> like UniversalWrite extends UniversalRead. Remove duplicated methods (new, len, is_empty, attach, source_len, populate, clear_ram_cache) from the write trait; keep only write_batch_multi and flusher. VecMultiUniversalWrite now impl MultiUniversalRead and MultiUniversalWrite separately. Made-with: Cursor
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.
Adds the multi-source universal I/O interface and minimal mmap-based implementation as planned in docs/design/multi-file-universal-io-plan.md.
Changes
SourceIdtype andMultiUniversalRead<T>trait withread_batch_multi, optionalsource_len,populate,clear_ram_cacheUniversalIoError::InvalidSourceIdvariantVecMultiUniversalRead<T, S>: holdsVec<S: UniversalRead<T>>, implementsMultiUniversalRead, supportsattach(source) -> SourceIdvec_multi_universal_read_batch_and_attachusingMmapUniversalsegment: handleInvalidSourceIdinFrom<UniversalIoError>forOperationErrorNo gridstore or other call-site changes in this PR; focus is interface + minimal impl only.
Made with Cursor