m1a2st commented on code in PR #23318:
URL: https://github.com/apache/kafka/pull/23318#discussion_r4110608450


##########
core/src/main/scala/kafka/server/AbstractFetcherThread.scala:
##########
@@ -604,10 +525,7 @@ abstract class AbstractFetcherThread(name: String,
   private def getOffsetTruncationState(tp: TopicPartition, leaderEpochOffset: 
EpochEndOffset): OffsetTruncationState =
     LockUtils.inLock(partitionMapLock , () => {
     if (leaderEpochOffset.endOffset == UNDEFINED_EPOCH_OFFSET) {
-      // truncate to initial offset which is the high watermark for follower 
replica. For
-      // future replica, it is either high watermark of the future replica or 
current
-      // replica's truncation offset (when the current replica truncates, it 
forces future
-      // replica's partition state to 'truncating' and sets initial offset to 
its truncation offset)
+      // truncate to initial offset which is the high watermark of the replica

Review Comment:
   Yes, those cases now surface as `OFFSET_OUT_OF_RANGE` and are handled by 
`fetchOffsetAndTruncate()` instead. I've removed both branches.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to