chia7712 commented on code in PR #20106: URL: https://github.com/apache/kafka/pull/20106#discussion_r2190801972
########## core/src/main/scala/kafka/server/ReplicaFetcherThread.scala: ########## @@ -166,12 +166,12 @@ class ReplicaFetcherThread(name: String, val partition = replicaMgr.getPartitionOrException(tp) val log = partition.localLogOrException - partition.truncateTo(offsetTruncationState.offset, isFuture = false) - if (offsetTruncationState.offset < log.highWatermark) Review Comment: Perhaps this log could be moved into `UnifiedLog#truncateTo`. `UnifiedLog#truncateTo` already logs if the target offset is larger than or equal to end offset, so adding another log for this case seems to make sense. Additionally, `ReplicaAlterLogDirsThread` could issue the same warning if the log is moved to `UnifiedLog#truncateTo` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org