Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Currently Mirrormaker uses deprecated AlterConfigs API when syncing topic configurations for broker compatibility to 0.11.0. In addition, Mirromaker has a configurable ConfigPropertyFilter  class to select the topic configuration properties to replicate and uses org.apache.kafka.connect.mirror.DefaultConfigPropertyFilter by default. The default class excludes certain topic configurations from replication such as follower.replication.throttled.replicas and leader.replication.throttled.replicas. 

However, the deprecated alterConfigs() AlterConfigs API replaces any existing configuration with the new configuration. Due to this, additional configurations set on a remote topic get cleared up when MirrorMaker syncs topic configurations whether they are excluded from replication or not. For example this prevents running Cruise Control on the target cluster as it may set follower.replication.throttled.replicas and leader.replication.throttled.replicas.

...

This KIP proposes to migrate the IncrementalAlterConfigs API for syncing topic configurations in MirrorMaker. The IncrementalAlterConfigs API has been around for several years since it was introduced in Kafka 2.3.0 and addresses the shortcoming of the deprecated AlterConfigs API. In order not to break the compatibility, we will introduce a new setting to MirrorMaker to give the option to enable IncrementalAlterConfigs API for syncing topic configurations. This new setting is expected to serve as a temporary measure until the next major release when the API is always used. 

...

  • Description: Deprecated. Whether to automatically use the IncrementalAlterConfigs  API API for syncing topic configurations. This configuration will be removed in Kafka 4.0 and the incrementalAlterConfigs IncrementalAlterConfigs API will be used by default. Users should make sure that the target cluster is running at least Kafka 2.3.0 or later. 

...

  • When set to requested, MirrorMaker will use the IncrementalAlterConfigs for syncing topic configurations. If it receives an error from an incompatible broker, will use the deprecated the alterConfigs API instead. It will also log a WARN message that says "The target cluster <ALIAS> is not compatible with the IncrementalAlterConfigs API. Therefore using the deprecated AlterConfigs API for syncing topic configurations. ". 
  • When explicitly set to never, MirrorMaker will use the deprecated AlterConfigs API for syncing topic configurations.
  • When explicitly set to required, MirrorMaker will use the IncrementalAlterConfigs API for syncing topic configurations. If it receives an error from an incompatible broker, the MirrorMaker will report this to the user and fail the connector. It will log an error that says "The target cluster <ALIAS> is not compatible with the IncrementalAlterConfigs API for syncing topic configurations.". 

...

  • use.incremental.alter.configs will be removed 
  • MirrorMaker will use the IncrementalAlterConfigs API to sync topic configurations by default. 

...

Currently, the integration tests for MirrorMaker do not check if the target topic has the expected configurations after applying configuration filters, hence this bug was not caught. A new New integration test tests that checks target topic configurations once they have been synced and tests different settings of the new configuration will be added. 

Rejected Alternatives

...