kamalcph commented on code in PR #13719:
URL: https://github.com/apache/kafka/pull/13719#discussion_r1195954775


##########
core/src/main/scala/kafka/server/AbstractFetcherThread.scala:
##########
@@ -680,12 +680,15 @@ abstract class AbstractFetcherThread(name: String,
        */
       val offsetAndEpoch = leader.fetchEarliestOffset(topicPartition, 
currentLeaderEpoch)
       val leaderStartOffset = offsetAndEpoch.offset
-      warn(s"Reset fetch offset for partition $topicPartition from 
$replicaEndOffset to current " +
-        s"leader's start offset $leaderStartOffset")
       val offsetToFetch = Math.max(leaderStartOffset, replicaEndOffset)
+      warn(s"Reset fetch offset for partition $topicPartition from 
$replicaEndOffset to " +

Review Comment:
   We have one WARN log when the leaderStartOffset is greater than the 
replicaEndOffset to let know the user that the replica log was fully truncated.
   
   In the other case, the follower/replica won't do any truncation and it's 
going to fetch from the `replicaEndOffset`. With unclean leader election 
enabled, we cannot know whether the log has diverged b/w leader and replica at 
this place. I was wondering, if can we reduce the logger level to INFO since 
the user won't get enough information from this log.



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