cmccabe commented on a change in pull request #11054:
URL: https://github.com/apache/kafka/pull/11054#discussion_r670005192



##########
File path: raft/src/main/java/org/apache/kafka/snapshot/SnapshotReader.java
##########
@@ -84,7 +84,7 @@ public int lastContainedLogEpoch() {
      */
     public long lastContainedLogTimestamp() {
         if (!lastContainedLogTimestamp.isPresent()) {
-            // nextBatch is expected to be empty
+            // nextBatch is expected to be equal to Optional.empty() so just 
replace it

Review comment:
       Can we check this and throw an exception if it's not true? I don't think 
this method is called often so performance should not be an issue.




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