Ron Dagostino created KAFKA-7231:
------------------------------------

             Summary: NetworkClient.newClientRequest() ignores custom request 
timeout in favor of the default
                 Key: KAFKA-7231
                 URL: https://issues.apache.org/jira/browse/KAFKA-7231
             Project: Kafka
          Issue Type: Bug
          Components: clients
    Affects Versions: 2.0.0
            Reporter: Ron Dagostino


The below code in {{org.apache.kafka.clients.KafkaClient}} is not passing in 
the provided {{requestTimeoutMs}} -- it is ignoring it in favor of the 
{{defaultRequestTimeoutMs}} value.
{code:java}
@Override
public ClientRequest newClientRequest(String nodeId,
                                      AbstractRequest.Builder<?> requestBuilder,
                                      long createdTimeMs,
                                      boolean expectResponse,
                                      int requestTimeoutMs,
                                      RequestCompletionHandler callback) {
     return new ClientRequest(nodeId, requestBuilder, correlation++, clientId, 
createdTimeMs, expectResponse,
            defaultRequestTimeoutMs, callback);
}
{code}

This is an easy fix, but the impact of fixing it is difficult to quantify.  
Clients that set a custom timeout are getting the default timeout of 1000 ms -- 
fixing this will suddenly cause the custom timeout to take effect.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to