ambry icon indicating copy to clipboard operation
ambry copied to clipboard

Add buffered directio to compaction

Open justinlin-linkedin opened this issue 1 year ago • 1 comments

Summary

Add a buffered implemetation of direct io for writing to log segment in compaction.

Details

We are add a configuration to switch between a buffered implementation and a non-buffered implementation. The code looks a bit weird right now as we have to compatible with the existing logic and use configuration to switch between the new logic and the existing one. After we verify the new logic (buffered direct io) would improve the disk performance, we have to refactor the code for io operation.

Test

Unit test

justinlin-linkedin avatar Mar 09 '24 18:03 justinlin-linkedin

Codecov Report

Attention: Patch coverage is 31.25000% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 30.25%. Comparing base (b4f759e) to head (a779a94). Report is 4 commits behind head on master.

Files Patch % Lines
...c/main/java/com/github/ambry/store/LogSegment.java 26.66% 21 Missing and 1 partial :warning:
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #2731       +/-   ##
=============================================
- Coverage     70.43%   30.25%   -40.19%     
+ Complexity    11597     4105     -7492     
=============================================
  Files           837      837               
  Lines         71246    71277       +31     
  Branches       8552     8556        +4     
=============================================
- Hits          50184    21563    -28621     
- Misses        18432    47782    +29350     
+ Partials       2630     1932      -698     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Mar 09 '24 18:03 codecov-commenter