Skip to content

Commit 2e5a776

Browse files
authored
fix(log): elastic log supports truncateFullyAndStartAt (#2913)
fix(log): elastic log supports truncate Signed-off-by: Robin Han <[email protected]>
1 parent 3375bd3 commit 2e5a776

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/src/main/scala/kafka/log/streamaspect/ElasticLog.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,12 @@ class ElasticLog(val metaStream: MetaStream,
596596
}
597597
}
598598

599+
override private[log] def truncateFullyAndStartAt(newOffset: Long): Iterable[LogSegment] = {
600+
val rst = super.truncateFullyAndStartAt(newOffset)
601+
_confirmOffset.set(logEndOffsetMetadata)
602+
rst
603+
}
604+
599605
def snapshot(snapshot: PartitionSnapshot.Builder): Unit = {
600606
snapshot.logMeta(logSegmentManager.logMeta())
601607
snapshot.logEndOffset(confirmOffset)

0 commit comments

Comments
 (0)