Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-7231

NetworkClient.newClientRequest() ignores custom request timeout in favor of the default

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 2.0.1, 2.1.0
    • clients
    • None

    Description

      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.

      @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);
      }
      

      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.

      Attachments

        Issue Links

          Activity

            People

              hachikuji Jason Gustafson
              rndgstn Ron Dagostino
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: