-
Notifications
You must be signed in to change notification settings - Fork 332
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): Add WriteCache struct and write SSTs to write cache #2999
Conversation
fdf5f7e
to
168f05a
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2999 +/- ##
==========================================
- Coverage 85.68% 85.13% -0.56%
==========================================
Files 806 806
Lines 131511 131563 +52
==========================================
- Hits 112689 112003 -686
- Misses 18822 19560 +738 |
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
After some experiments, I plan to simplify the implementation of the write-through cache and upload files to object stores synchronously. Then we can remove |
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
This PR implements a skeleton for the
WriteCache
that serves as a write-through cache for object stores.WriteCache
The
WriteCache
has a local store to cache files.The
WriteCache
has awrite_and_upload_sst()
method to write files to the cache (a local store) and upload them to object stores.Upload can be sync or async. We will implement the sync version first.
The
recover()
method will recover the underlying file cache.The
AccessLayer
hides the details of writing SSTs to the write cache.Checklist
Refer to a related PR or issue link (optional)