splett2 commented on code in PR #14470:
URL: https://github.com/apache/kafka/pull/14470#discussion_r1343327345
##########
core/src/main/scala/kafka/server/ReplicaManager.scala:
##########
@@ -787,19 +770,22 @@ class ReplicaManager(val config: KafkaConfig,
)
}
- val errorResults = errorsPerPartition.map {
- case (topicPartition, error) =>
- topicPartition -> LogAppendResult(
- LogAppendInfo.UNKNOWN_LOG_APPEND_INFO,
- Some(error.exception())
+ val allResults = localProduceResults ++ errorResults
+ val produceStatus = allResults.map { case (topicPartition, result) =>
+ topicPartition -> ProducePartitionStatus(
+ result.info.lastOffset + 1, // required offset
+ new PartitionResponse(
+ result.error,
+ result.info.firstOffset,
+ result.info.lastOffset,
+ result.info.logAppendTime,
+ result.info.logStartOffset,
+ result.info.recordErrors,
+ result.exception.map(_.getMessage).orNull
Review Comment:
Hmm, good catch. somehow I didn't think about that. I refactored some of the
LogAppendResult stuff to try to make it more explicit when we use a custom
error message.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]