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: Add freeze and fork method to the memtable #3374
feat: Add freeze and fork method to the memtable #3374
Conversation
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3374 +/- ##
==========================================
- Coverage 85.59% 85.20% -0.39%
==========================================
Files 892 892
Lines 146564 146596 +32
==========================================
- Hits 125448 124912 -536
- Misses 21116 21684 +568 |
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
What's changed and what's your intention?
This PR changes some APIs of the memtable
mark_immutable()
tofreeze()
.freeze()
turns a mutable memtable into an immutable memtable and this operation is fallible.fork()
method to create a new mutable memtable from an immutable memtable.iter()
method is fallible.Now the region instead of the memtable builder generates the memtable id. So the memtable builder needs to take a memtable id to build a new memtable.
Checklist
Refer to a related PR or issue link (optional)