[ 
https://issues.apache.org/jira/browse/KAFKA-2805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14999828#comment-14999828
 ] 

Jun Rao commented on KAFKA-2805:
--------------------------------

>From the RB, that's the explanation from Mayuresh.

In this case :" Second, let's say the producer can't connect to any broker. The 
producer can't refresh the metdata. So the leader will still be the old one and 
may not be null. In this case, it seems that we should still expire the 
records.", the request will eventually fail due to requestTimeout and retry 
exhaustion, when trying to send to broker.

What he is saying is that if the leader is not null, we will be keep resending 
to the leader broker that may not be reachable and eventually the request will 
error out when all retries are exhausted.

> RecordAccumulator request timeout only enforced if partition leader is unknown
> ------------------------------------------------------------------------------
>
>                 Key: KAFKA-2805
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2805
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jason Gustafson
>
> From the user mailing list, the null check in batch expiration in 
> RecordAccumulator seems questionable: 
> https://github.com/apache/kafka/blob/ae5a5d7c08bb634576a414f6f2864c5b8a7e58a3/clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java#L220.
>  
> If this is correct behavior, it is probably worthwhile clarifying the purpose 
> of the check in a comment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to