-
Notifications
You must be signed in to change notification settings - Fork 334
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: Implement memtable range #4162
Conversation
Is it possible to completely deprecate |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4162 +/- ##
==========================================
- Coverage 84.92% 84.59% -0.34%
==========================================
Files 1023 1024 +1
Lines 179298 179502 +204
==========================================
- Hits 152272 151846 -426
- Misses 27026 27656 +630 |
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
It should be possible. Do we need to do it in this PR? Maybe we can deprecate |
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
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?
This PR implements
MemtableRange
to represent a partition (range) of a memtable. This allows iterating the memtable concurrently. The memtable range keeps anIterBuilder
to build an iterator to read that range.The
Memtable
trait has a new methodranges()
to return the list of ranges to read. Bothtime_series
andpartition_tree
memtables return just 1 range.The
ScanPart
now keeps a list ofMemtableRange
instead ofMemtable
.It also refactors the
FileRange
and extracts a structRangeBase
so we can reuse it in other places. TheRangeBase
contains fields to prune batches from a file.Checklist