Closed justinlin-linkedin closed 6 months ago
Attention: Patch coverage is 5.40541%
with 35 lines
in your changes are missing coverage. Please review.
Project coverage is 30.08%. Comparing base (
52ba813
) to head (b3674df
). Report is 2 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary
In full range compaction (CompactAllPolicy), we would return all log segments what are not in journal to compactor, even if some of the log segments are having 100% of valid data. This is totally unnecessary, especially for leading and trailing log segments. Since we would have to copy all of their data out to a new log segment file.
What is new
Add a configuration to
StoreConfig
to control this featureAdded a new configuration to
StoreConfig
to control this feature. This will be turn off by default and we need to change configuration to turn this on. This feature will be first turned on on only a few hosts and make sure it works, then propagate to other hostsAdd a new interface
LogSegmentSizeProvider
to expose the data size of each log segment.BlobStoreStats
object has a reference toPersistentIndex
, which knows the data size of eachLogSegment
. To best test the new logic, we are creating a new interfaceLogSegmentSizeProvider
and letPersistentIndex
implement this interface. In test, we have a map-based mock implementation.Add a filter function to filter out leading and trailing log segment whose data is 100% valid.
Test
Unit tests