mattwong949 commented on code in PR #13206:
URL: https://github.com/apache/kafka/pull/13206#discussion_r1113664441


##########
core/src/main/scala/kafka/server/AbstractFetcherThread.scala:
##########
@@ -400,12 +386,7 @@ abstract class AbstractFetcherThread(name: String,
                 case Errors.OFFSET_OUT_OF_RANGE =>
                   if (!handleOutOfRangeError(topicPartition, 
currentFetchState, fetchPartitionData.currentLeaderEpoch))
                     partitionsWithError += topicPartition
-                case Errors.OFFSET_MOVED_TO_TIERED_STORAGE =>
-                  debug(s"Received error 
${Errors.OFFSET_MOVED_TO_TIERED_STORAGE}, " +
-                    s"at fetch offset: ${currentFetchState.fetchOffset}, " + 
s"topic-partition: $topicPartition")
-                  if (!handleOffsetsMovedToTieredStorage(topicPartition, 
currentFetchState,
-                    fetchPartitionData.currentLeaderEpoch, 
partitionData.logStartOffset()))

Review Comment:
   ah i believe this was a mistake. I wanted the `TierStateMachine.start` to 
use the fetch response as well. thanks for the catch



##########
core/src/main/scala/kafka/server/AbstractFetcherThread.scala:
##########
@@ -683,33 +655,24 @@ abstract class AbstractFetcherThread(name: String,
        * produced to the new leader. While the old leader is trying to handle 
the OffsetOutOfRangeException and query
        * the log end offset of the new leader, the new leader's log end offset 
becomes higher than the follower's log end offset.
        *
-       * In the first case, the follower's current log end offset is smaller 
than the leader's log start offset
-       * (or leader's local log start offset).
-       * So the follower should truncate all its logs, roll out a new segment 
and start to fetch from the current
-       * leader's log start offset(or leader's local log start offset).
+       * In the first case, the follower's current log end offset is smaller 
than the leader's log start offset. So the
+       * follower should truncate all its logs, roll out a new segment and 
start to fetch from the current leader's log
+       * start offset.

Review Comment:
   Yes this was just a revert to the original comments and logic. but this 
makes sense, I can try to clear up the cases. thanks for the comment suggestion



-- 
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

Reply via email to