splett2 commented on code in PR #14485: URL: https://github.com/apache/kafka/pull/14485#discussion_r1345807911
########## core/src/main/scala/kafka/raft/KafkaMetadataLog.scala: ########## @@ -96,7 +96,7 @@ final class KafkaMetadataLog private ( } private def handleAndConvertLogAppendInfo(appendInfo: internals.log.LogAppendInfo): LogAppendInfo = { - if (appendInfo.firstOffset != UnifiedLog.UnknownOffset) + if (appendInfo.numMessages() > 0) Review Comment: The calc for `numMessages` is below: ``` public long numMessages() { if (firstOffset >= 0 && lastOffset >= 0) { return lastOffset - firstOffset + 1; } return 0; } ``` I think this captures a similar intent to checking whether the first offset is `-1` or not. -- 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