-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: unify puffin name passed to stager #5564
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Zhenchi <[email protected]>
Signed-off-by: Zhenchi <[email protected]>
Signed-off-by: Zhenchi <[email protected]>
Signed-off-by: Zhenchi <[email protected]>
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Signed-off-by: Zhenchi <[email protected]>
…zc/unify-name-stager
a63e11f
to
cf171a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (3)
src/mito2/src/sst/parquet/reader.rs:390
- Using 'index_file_size' as the file size hint for both the fulltext and bloom filter index operations replaces the previously distinct inverted_index_size and bloom_filter_index_size. Please double‐check that this change is intentional and that it correctly reflects the size for all index types.
let file_size_hint = self.file_handle.meta_ref().index_file_size();
src/mito2/src/sst/index/puffin_manager.rs:84
- [nitpick] The introduction of the new 'path_provider' parameter unifies file path handling for Puffin operations. Ensure that its interface conforms to the FilePathProvider trait and that all references in calling code are updated consistently.
pub(crate) fn build(
src/mito2/src/sst/index/fulltext_index/creator.rs:496
- [nitpick] The removal of the 'file_path' variable in favor of using 'FileId' directly improves clarity. Verify that all related documentation and tests have been updated accordingly to reflect this change.
let file_path = location::index_file_path(®ion_dir, sst_file_id);
where | ||
S: Stager, | ||
W: AsyncWrite + Unpin + Send, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking: It only requires the Stager trait bound.
where | |
S: Stager, | |
W: AsyncWrite + Unpin + Send, | |
where | |
S: Stager, |
where | ||
S: Stager, | ||
W: AsyncWrite + Unpin + Send, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where | |
S: Stager, | |
W: AsyncWrite + Unpin + Send, | |
where | |
S: Stager, |
@@ -169,7 +174,7 @@ impl Stager for BoundedStager { | |||
notifier.on_load_blob(timer.elapsed()); | |||
} | |||
let guard = Arc::new(FsBlobGuard { | |||
puffin_file_name: puffin_file_name.to_string(), | |||
handle: handle_str.to_string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move the handle_str?
handle: handle_str.to_string(), | |
handle: handle_str, |
pub(crate) fn build( | ||
&self, | ||
store: ObjectStore, | ||
path_provider: impl FilePathProvider + 'static, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pass Arc<dyn FilePathProvider>
? So we don't need to make this method generic.
path_provider: impl FilePathProvider + 'static, | |
path_provider: Arc<dyn FilePathProvider>, |
if file_cache.get(index_key).await.is_some() { | ||
puffin_manager = Some(self.puffin_manager_factory.build( | ||
file_cache.local_store(), | ||
WriteCachePathProvider::new(self.region_id, file_cache.clone()), | ||
)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cache may remove the file before we get the dir. We may need to fallback to remote reader if we can't get the dir.
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
puffin_file_name
tohandle
in a series of traits related to Puffin Manager, and introduce an associated typeFileHandle
.FileHandle
asFileId
in mito2.path_provider
toObjectStorePuffinFileAccessor
to generate a file path usingpath_provider
when constructing areader
orwriter
based onFileId
PR Checklist
Please convert it to a draft if some of the following conditions are not met.