-
Notifications
You must be signed in to change notification settings - Fork 314
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: Partition memtables by time if compaction window is provided #3501
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3501 +/- ##
==========================================
- Coverage 85.35% 84.95% -0.41%
==========================================
Files 903 905 +2
Lines 149639 150400 +761
==========================================
+ Hits 127726 127770 +44
- Misses 21913 22630 +717 |
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 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 introduces a new struct
TimePartitions
to partition mutable memtables by time.compaction.twcs.time_window
) as the partition time range[start_time, start_time + time_window)
timestamp / time_window * time_window
to locate the proper partitionTimePartitions
to immutable memtable list.With this feature, a region can strictly divide data by the time in memory. It also ensures flushed SSTs only belong to a single time window.
Checklist