aliehsaeedii commented on code in PR #16344:
URL: https://github.com/apache/kafka/pull/16344#discussion_r1650696721
##########
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java:
##########
@@ -1175,19 +1176,26 @@ private ClusterAndWaitTime waitOnMetadata(String topic,
Integer partition, long
try {
metadata.awaitUpdate(version, remainingWaitMs);
} catch (TimeoutException ex) {
+ final String errorMessage = String.format("Topic %s not
present in metadata after %d ms.",
+ topic, maxWaitMs);
+ if (metadata.getError(topic) != null) {
+ throw new TimeoutException(errorMessage,
metadata.getError(topic).exception());
+ }
// Rethrow with original maxWaitMs to prevent logging
exception with remainingWaitMs
Review Comment:
> Also just to be clear -- this code path is not one where we see anyting
but retriable exceptions? I noticed the other path checks that but not this one.
Please see https://github.com/apache/kafka/pull/16344#discussion_r1648061530
--
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]