KSTORAGE-725: Exclude segments where the high offset is lower than the...
KSTORAGE-725: Exclude segments where the high offset is lower than the lowerBoundOffset for tiering. (#1796) * KSTORAGE-725: Only qualify segments where the last offset is larger than the upperBoundOffset for tiering. When dealing with topics which were previously compacted and have been converted to non compacted topics, holes in the log can cause MergedLog::localLogSegments to return segments for which the largest offset in the segment is less than the lowerBoundOffset. This PR adds an additional filter to the set of candidate segments for tiering which enforces that segments with a high offset less than the lower bound offset are excluded from tiering.
显示
- core/src/main/scala/kafka/log/LogSegment.scala 36 个添加, 6 个删除core/src/main/scala/kafka/log/LogSegment.scala
- core/src/main/scala/kafka/log/MergedLog.scala 4 个添加, 2 个删除core/src/main/scala/kafka/log/MergedLog.scala
- core/src/test/java/kafka/tier/fetcher/TierFetcherTest.java 12 个添加, 3 个删除core/src/test/java/kafka/tier/fetcher/TierFetcherTest.java
- core/src/test/scala/unit/kafka/log/LogSegmentTest.scala 27 个添加, 0 个删除core/src/test/scala/unit/kafka/log/LogSegmentTest.scala
- core/src/test/scala/unit/kafka/log/LogUtils.scala 3 个添加, 1 个删除core/src/test/scala/unit/kafka/log/LogUtils.scala
- core/src/test/scala/unit/kafka/log/MergedLogTest.scala 50 个添加, 0 个删除core/src/test/scala/unit/kafka/log/MergedLogTest.scala
加载中
想要评论请 注册 或 登录