You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jason Gustafson (JIRA)" <ji...@apache.org> on 2018/11/21 22:18:00 UTC

[jira] [Resolved] (KAFKA-7231) NetworkClient.newClientRequest() ignores custom request timeout in favor of the default

     [ https://issues.apache.org/jira/browse/KAFKA-7231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Gustafson resolved KAFKA-7231.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.1
                   2.1.0

> 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
>            Assignee: Jason Gustafson
>            Priority: Minor
>             Fix For: 2.1.0, 2.0.1
>
>
> 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 -- fixing this will suddenly cause the custom timeout to take effect.



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