-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pageserver: handle decompression outside vectored
read_blobs
(#8942)
Part of #8130. ## Problem Currently, decompression is performed within the `read_blobs` implementation and the decompressed blob will be appended to the end of the `BytesMut` buffer. We will lose this flexibility of extending the buffer when we switch to using our own dio-aligned buffer (WIP in #8730). To facilitate the adoption of aligned buffer, we need to refactor the code to perform decompression outside `read_blobs`. ## Summary of changes - `VectoredBlobReader::read_blobs` will return `VectoredBlob` without performing decompression and appending decompressed blob. It becomes the caller's responsibility to decompress the buffer. - Added a new `BufView` type that functions as `Cow<Bytes, &[u8]>`. - Perform decompression within `VectoredBlob::read` so that people don't have to explicitly thinking about compression when using the reader interface. Signed-off-by: Yuchen Liang <[email protected]>
- Loading branch information
Showing
3 changed files
with
200 additions
and
61 deletions.
There are no files selected for viewing
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
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
Oops, something went wrong.
4f67b02
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.
5074 tests run: 4899 passed, 1 failed, 174 skipped (full report)
Failures on Postgres 16
test_pgbench[neon-github-actions-selfhosted-45-10]
: release-x86-64Flaky tests (6)
Postgres 17
test_pageserver_compaction_smoke
: release-x86-64, release-arm64test_multixid_wraparound_import
: debug-x86-64test_subscriber_restart
: release-x86-64Postgres 16
test_subscriber_restart
: release-x86-64Postgres 14
test_ondemand_wal_download_in_replication_slot_funcs
: release-x86-64Code coverage* (full report)
functions
:32.2% (7478 of 23255 functions)
lines
:50.0% (60243 of 120574 lines)
* collected from Rust tests only
4f67b02 at 2024-09-24T19:08:15.372Z :recycle: