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

REST extensions can mutate connector configs in worker config state snapshot

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0, 2.4.0, 2.3.1, 2.5.0, 2.4.1
    • Fix Version/s: 2.3.2, 2.6.0, 2.4.2, 2.5.1
    • Component/s: KafkaConnect
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: