-
Notifications
You must be signed in to change notification settings - Fork 328
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(mito): implements row group level page cache #2688
Merged
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
evenyag
force-pushed
the
feat/page-cache
branch
2 times, most recently
from
November 9, 2023 04:08
e0a00b4
to
f5ed41a
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #2688 +/- ##
===========================================
- Coverage 85.47% 85.14% -0.33%
===========================================
Files 777 779 +2
Lines 125919 126339 +420
===========================================
- Hits 107626 107573 -53
- Misses 18293 18766 +473 |
evenyag
force-pushed
the
feat/page-cache
branch
from
November 11, 2023 08:23
929f1bc
to
67cb823
Compare
fengjiachun
approved these changes
Nov 15, 2023
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.
LGTM
killme2008
reviewed
Nov 15, 2023
killme2008
approved these changes
Nov 18, 2023
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.
LGTM. There is a confict @evenyag
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.
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
This PR implements a row group-level page cache for the mito engine.
It adds a new page reader
CachedPageReader
that returns pages of a row group from the cache.The first time we read a row group, we load all pages of the row group and put it into the cache. The next time we can fetch cached pages from the cache and build a
CachedPageReader
.We use
region id, file id, row group index, column index
as cache key, which means we can only cache a column's row group level pages.Cached pages are decompressed, so we can skip the decompression step and reduce 20% ~ 30% of the total scan time if a query hits the cache.
Checklist
Refer to a related PR or issue link (optional)