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

huxihx commented on KAFKA-5641:
-------------------------------

[~ijuma]
"The broker only processes one request at a time, so even if you send the 
metadata request, it won't be processed until the processing of the previous 
request is completed"
    ---- Seems this does not apply for METADATA request since sender thread 
only drains ProducerBatch and ensures the ordering by muting all batches from 
the same partitions before sending them out. 

In my opinion, NetworkClient could always process Metatadata request. The idea 
behind this jira is to say we could not honor 
`max.in.flight.requests.per.connection` when updating the metadata. That's to 
say, create a new method `canSendMoreNonProduceRequest` which does not care 
queue size. 

Do I make myself clear?

> Metadata request should always be allowed to send no regardless of value for 
> max.in.flight.requests.per.connection
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-5641
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5641
>             Project: Kafka
>          Issue Type: Improvement
>          Components: network, producer 
>    Affects Versions: 0.11.0.0
>            Reporter: huxihx
>
> Metadata request might not be able to be sent when 
> `max.in.flight.requests.per.connection` is set to 1 and there is already an 
> inflight request in the same node's queue, as show below:
> {code:title=NetworkClient.java|borderStyle=solid}
> private long maybeUpdate(long now, Node node) {
>             String nodeConnectionId = node.idString();
>             if (canSendRequest(nodeConnectionId)) {
>             ......
>             }
> {code}
> However, setting `max.in.flight.requests.per.connection` to 1 actually means 
> no out-of-order for the produced records, Metadata requests should have no 
> related with this config. We don't have to check the inflight request's queue 
> size when sending Metadata request.
> [~ijuma] Does it make any sense? If yes, I will work on it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to