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

Connect's validate REST endpoint uses incorrect timeout

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.6.3, 2.7.2, 2.8.1, 3.0.0
    • connect
    • None

    Description

      The fix for KAFKA-9374 changed how the `ConnectorPluginsResource` and its method to validate connector configurations used the `ConnectorsResource.REQUEST_TIMEOUT_MS` constant (90 seconds). However, in doing so it introduced a bug where the timeout was actually 1000x longer than desired/specified.

      In particular, the following line is currently:

                  return validationCallback.get(ConnectorsResource.REQUEST_TIMEOUT_MS, TimeUnit.SECONDS);
      

      but should be:

                  return validationCallback.get(ConnectorsResource.REQUEST_TIMEOUT_MS, TimeUnit.MILLISECONDS);
      

      Users may run into this whenever validating a connector configuration where the connector implementation takes more than the 90 seconds to actually validate the configuration.

      • Without this fix, the `PUT /connector-plugins/(string:name)/config/validate` REST requests might *not* return `500 Internal Server Error` and may block (the request thread) for a long period of time.
      • With this fix, the `PUT /connector-plugins/(string:name)/config/validate` REST requests might *not* return `500 Internal Server Error` if the connector does not complete the validation of a connector configuration within 90 seconds.

      The user will not see a difference between the behavior before or after this fix if/when the connectors complete validation of connector configurations before 90 seconds, since the method will return those results to the client.

      Attachments

        Issue Links

          Activity

            People

              rhauch Randall Hauch
              rhauch Randall Hauch
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: