splett2 commented on code in PR #14470:
URL: https://github.com/apache/kafka/pull/14470#discussion_r1342909611


##########
core/src/main/scala/kafka/raft/KafkaMetadataLog.scala:
##########
@@ -96,10 +96,10 @@ final class KafkaMetadataLog private (
   }
 
   private def handleAndConvertLogAppendInfo(appendInfo: 
internals.log.LogAppendInfo): LogAppendInfo = {
-    if (appendInfo.firstOffset.isPresent())
-      new LogAppendInfo(appendInfo.firstOffset.get().messageOffset, 
appendInfo.lastOffset)
+    if (appendInfo.firstOffset != UnifiedLog.UnknownOffset)
+      new LogAppendInfo(appendInfo.firstOffset, appendInfo.lastOffset)
     else
-      throw new KafkaException(s"Append failed unexpectedly: 
${appendInfo.errorMessage}")

Review Comment:
   `errorMessage` would have never been populated in the calling context of 
`handleAndConvertLogAppendInfo`, so it is just dropped from the log in the PR.



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