-
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
Support table compaction #930
Comments
Do we have any solutions to fix this issue? Looks like it's impossible. |
Maybe we need to introduce some mechanism like MVCC for it, but I think it's not necessary to do so. |
We need to keep track of all |
I think this might not be a problem. Now we only support reading the latest data. In this case, we acquire a reference to a stable
Introduces snapshot like other dbs if we need a stable snapshot but also want to release the unused SSTs. |
I think we can close this issue. Open a new issue when we want to support other compaction features. |
What type of enhancement is this?
Performance
What does the enhancement do?
So far GreptimeDB supports flushing rows in memtable to SST files in level 0. But SST files in level 0 is not sorted in time bucket order, so retrieving rows in a given time range needs to scan all SST files in level 0. Just like other LSM tree based storage engines, we need to compact SST files in different levels to:
The RFC can be found at #939.
Implementation challenges
We need to implement those component:
track the referencer of SST files and only delete these SSTs when it's been marked as "deleted" and reference count is 0.
Future work
The text was updated successfully, but these errors were encountered: