-
Notifications
You must be signed in to change notification settings - Fork 442
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
refactor(write path): newtype to enforce use of fully initialized slices #8717
Merged
Conversation
This file contains 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
Need this so we can pass in Bytes to the l0 flush code
github-actions
bot
added
the
external
A PR or Issue is created by an external user
label
Aug 13, 2024
2182 tests run: 2113 passed, 0 failed, 69 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
b55a70a at 2024-08-14T17:35:51.564Z :recycle: |
VladLazar
reviewed
Aug 14, 2024
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.
Code looks good, but I have questions. I'd especially like to verify my understanding of the assertion
problame
changed the title
refactor(write path): take tokio_epoll_uring::Slice and require
refactor(write path): newtype to enforce use of fully initialized slices
Aug 14, 2024
bytes_init() == bytes_total()
VladLazar
approved these changes
Aug 14, 2024
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.
looks good!
5 tasks
bayandin
added a commit
that referenced
this pull request
Aug 15, 2024
## Problem On macOS, clippy fails with the following error: ``` error: unused import: `crate::virtual_file::owned_buffers_io::io_buf_ext::IoBufExt` --> pageserver/src/tenant/remote_timeline_client/download.rs:26:5 | 26 | use crate::virtual_file::owned_buffers_io::io_buf_ext::IoBufExt; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-D unused-imports` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_imports)]` ``` Introduced in #8717 ## Summary of changes - allow `unused_imports` for `crate::virtual_file::owned_buffers_io::io_buf_ext::IoBufExt` on macOS in download.rs
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.
The
tokio_epoll_uring::Slice
/tokio_uring::Slice
type is weird.The new
FullSlice
newtype is better. See the doc comment for details.The naming is not ideal, but we'll clean that up in a future refactoring where we move the
FullSlice
intotokio_epoll_uring
. Then, we'll do the following:FullSlice
becomestokio_epoll_uring::IoBufView
tokio_epoll_uring::IoBufMutView
for the currenttokio_epoll_uring::Slice<IoBufMut>
Context
I did this work in preparation for #8537.
There, I'm changing the type that the
inmemory_layer.rs
passes toDeltaLayerWriter::put_value_bytes
and thus it seemed like a good opportunity to make this cleanup first.