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 WAL Compression #12476
base: master
Are you sure you want to change the base?
Support WAL Compression #12476
Conversation
834e61d
to
70d8400
Compare
89b0f35
to
94152b2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12476 +/- ##
============================================
+ Coverage 43.37% 43.44% +0.07%
Complexity 69 69
============================================
Files 3164 3165 +1
Lines 196704 196931 +227
Branches 23431 23459 +28
============================================
+ Hits 85316 85557 +241
+ Misses 111388 111374 -14 ☔ View full report in Codecov by Sentry. |
remove metrics in mem table flush task, cache hash code in partial path, use gzip to compress wal batch update metrics
e7250f8
to
069795d
Compare
Quality Gate failedFailed conditions |
The write-ahead logging consumes a significant amount of I/O resources during data writing, sometimes even 2-7 times the amount of TsFile I/O. Currently, the write-ahead logging in the system is uncompressed, this is a main reason for the large volume of WAL. Therefore, compressing the write-ahead logging can save I/O resources and enhance system performance. This PR primarily introduces support for compressing write-ahead logging, featuring the following characteristics:
The basic unit for compression and decompression is a WAL Buffer, which may contain several WAL Entries, with a default size of 16MB. This design achieves a good compression ratio while minimizing modifications to upper-layer applications.
To maintain compatibility with previous versions, we have replaced the original Magic String in the WAL file with a Version String to distinguish between different versions of WAL. If there are subsequent new versions of WAL, we can continue to add new Version Strings.
Multiple compression methods are supported. Currently, the choice of compression method is not open to users, but theoretically, our design supports various compression methods, and we may open this option in the future.
Changes in system resource consumption and system performance caused by this feature will be supplemented in subsequent comments.