-
Notifications
You must be signed in to change notification settings - Fork 973
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
refactor!(shwap/store): decouple Q1Q4 and ODS files #3643
Conversation
4cccb18
to
5a4dff4
Compare
One more optimization to do here is to open files lazily. However, that's not trivial, as we detect whether file is empty or not only while opening it and we can't open empty file lazily with ease. Options:
I am going with the last option. It's simple and optimizes for the more common case: ODS usage without Q4. The less common but still possible case where Q4 is used without ODS is not covered, but its less common(only for sampling) and might not worth additional complexity to handle it. |
f08245d
to
eb86046
Compare
This PR simplifies and cleans row/col read logic in preparation for ODS and Q1Q4 files decoupling. Mainly, it removes quadrant offset from calculations
4746808
to
c59d96a
Compare
Makes ODS and Q4 distinct physical files with different extentions. Both files are hardlinked separately
c59d96a
to
a8c83e7
Compare
Treating empty file as an empty block can create issues for node operators and is a foot gun. To avoid this, we make empty file a proper file. Besides, we refresh empty file on start to ensure its consistent with canonical empty file kept in mem.
This yields additional 27% improvement on the Put operation for the store. The discrepancy seems to grow with the block size.
a8c83e7
to
4ee148f
Compare
The main goal of this PR is to decouple Q1Q4 and ODS files physically, so now there are two files
.ods
and.q4
. This is needed to fix and unblock trimming in #3620. Besides, this PR ends up shaving off another ~27% of times it take for Put.This PR is split into several commits that are independently reviewable and should be merged as so.
TODO: