[ https://issues.apache.org/jira/browse/KAFKA-774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Neha Narkhede updated KAFKA-774: -------------------------------- Attachment: kafka-774-v3.patch I see your concern here. The reason we convert those exceptions to one of LeaderNotAvailable or ReplicaNotAvailable is so that the client can appropriately understand the nature of the error. In other words, if there was "some" error while fetching the leader for a partiton, the client will only care about LeaderNotAvailable as far as topic metadata request is concerned. What we need to think is whether the client will understand any other type of internal Kafka exception. If yes, we should cover that, if not we can send whatever level of detail is easy for clients to understand. Hence, the conversion. But you raised a good point, just from troubleshooting perspective, it might be worth at least logging the root cause on the server. This patch adds that. > Periodic refresh of topic metadata on the producer does not check for error > code in the response > ------------------------------------------------------------------------------------------------ > > Key: KAFKA-774 > URL: https://issues.apache.org/jira/browse/KAFKA-774 > Project: Kafka > Issue Type: Bug > Components: producer > Affects Versions: 0.8 > Reporter: Neha Narkhede > Assignee: Neha Narkhede > Priority: Blocker > Labels: p1 > Attachments: kafka-774.patch, kafka-774-v2.patch, kafka-774-v3.patch > > > The producer does a periodic refresh of the metadata but marks the attempt as > successful based only on whether the response was received or not. It does > not check for error codes in the response. This is probably ok since those > produce requests will fail and the required topics will enter the list for > topic metadata refresh in the next attempt. However, it will be good to log > this since it looks like the metadata was refreshed but actually there could > be failures. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira