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

REST extensions can mutate connector configs in worker config state snapshot

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.0, 2.4.0, 2.3.1, 2.5.0, 2.4.1
    • 2.3.2, 2.6.0, 2.4.2, 2.5.1
    • connect
    • None

    Description

      The changes made in KIP-454 involved adding a connectorConfig method to the ConnectClusterState interface that REST extensions could use to query the worker for the configuration of a given connector. The implementation for this method returns the Java Map that's stored in the worker's view of the config topic (when running in distributed mode). No copying is performed, which causes mutations of that Map object to persist across invocations of connectorConfig and, even worse, propagate to the worker when, e.g., starting a connector.

      We should not give REST extensions that original map, but instead a copy of it.

      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: