ahuang98 commented on code in PR #18852:
URL: https://github.com/apache/kafka/pull/18852#discussion_r1962425394


##########
core/src/main/scala/kafka/log/UnifiedLog.scala:
##########
@@ -1159,6 +1180,25 @@ class UnifiedLog(@volatile var logStartOffset: Long,
       validBytesCount, lastOffsetOfFirstBatch, 
Collections.emptyList[RecordError], LeaderHwChange.NONE)
   }
 
+  /**
+   * Return true if the record batch has a higher leader epoch than the 
specified leader epoch
+   *
+   * @param batch the batch to validate
+   * @param origin the reason for appending the record batch
+   * @param leaderEpoch the epoch to compare
+   * @return true if the append reason is replication and the batch's 
partition leader epoch is
+   *         greater than the leader epoch, otherwise false

Review Comment:
   nit: maybe this could be further adjusted to 
   `and the batch's partition leader epoch is greater than specified 
leaderEpoch, otherwise false`



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