You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "dajac (via GitHub)" <gi...@apache.org> on 2023/02/08 09:58:21 UTC

[GitHub] [kafka] dajac commented on a diff in pull request #12813: KAFKA-14317: ProduceRequest timeouts are logged as network exceptions

dajac commented on code in PR #12813:
URL: https://github.com/apache/kafka/pull/12813#discussion_r1099905173


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java:
##########
@@ -641,7 +643,7 @@ private void completeBatch(ProducerBatch batch, ProduceResponse.PartitionRespons
                 // thus it is not safe to reassign the sequence.
                 failBatch(batch, response, batch.attempts() < this.retries);
             }
-            if (error.exception() instanceof InvalidMetadataException) {
+            if (error.exception() instanceof InvalidMetadataException || error.exception() instanceof TimeoutException) {

Review Comment:
   I agree that we should refresh on `TimeoutException`. I wanted to point out that we are already doing it there: https://github.com/apache/kafka/blob/d6e35f3c41880c102faf774926cfb104a012de3f/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java#L786. Hence I wonder if we need to add it here as well.



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org