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

ConnectRestExtensionContext does not return list of connectors from its ConnectClusterState

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0, 2.0.1, 2.1.0, 2.1.1
    • 2.0.2, 2.3.0, 2.1.2, 2.2.1
    • connect
    • None

    Description

      Title is not entirely accurate, but describes the most common way this bug presents itself.

      The ConnectClusterStateImpl used by Kafka Connect to provide cluster information to REST extensions makes an asynchronous call to Herder.connectors(...) in its  connectors() method that populates a list of connector names, then immediately returns that list of connector names. If the list is read soon after it is returned, it's possible it will be empty or at least not completely populated.

      Since the method is implicitly synchronous (no callback logic is involved in its parameters or return values, and there is no documentation indicating asynchronous behavior for the ConnectClusterState.connectors() method), this should be remedied by adding a wait for the Herder.connectors(...) method to complete in the ConnectClusterStateImpl.connectors() method.

      Attachments

        Issue Links

          Activity

            People

              ChrisEgerton Chris Egerton
              ChrisEgerton Chris Egerton
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: