Versions Compared

Key

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

...

  1. alterConfigs has been deprecated and will be removed in a future release;
  2. we are using incrementalAlterConfigs to change user/topic/client-metrics configs, it would be benefit to unify broker configs.
  3. incrementalAlterConfigs is more convenient especially for updating configs of list data type, such as "leader.replication.throttled.replicas" 

Note that I'm only changing the way we updating broker configs, user/topic/client-metrics configs are already being updated using incrementalAlterConfigs

Public Interfaces

kafka-configs.sh

  1. add Adding new options --disable-incremental , which is used for new client to connect to older servers before 2.3.0 when updating broker configs.

Proposed Changes

...


  1. --disable-incremental is only makes sense when used together with (--alter) and (--broker <broker-id>)/(--entity-types brokers), or it will be ignored.
  2. --disable-incremental is only makes sense when used together with (--bootstrap-server)/(bootstrap-controller), we are leaving zookeeper case unchanged.
  3. use AdminClient.incrementalAlterConfigs without --disable-incremental flag when alter broker configs, which will fail if the broker is before 2.3.0.


here is an example of changing the broker configs twice:

  1. set log.cleaner.threads=2
  2. set background.threads=1

in old case, here are what happened:

  1. Use kafka-configs.sh to set log.cleaner.threads=2, the client will fetch all broker configs and get a empty properties {}, merge it with the delta and get {log.cleaner.threads=2}, send it to server using AdminClient.alterConfigs(), the server will persist it to metadata storage.
  2. Use kafka-configs.sh to set background.threads=1, the client will fetch all broker configs and get {log.cleaner.threads=2}, merge it with the delta and get {log.cleaner.threads=2, background.threads=1 }, send it to server using AdminClient.alterConfigs(), the server will persist it to metadata storage.

in new case, here are what happened:

  1. Use kafka-configs.sh to set background.threads=1, the client will send it to server using AdminClient.incrementalAlterConfigs(), the broker will merge the old snapshot with delta and save the new snapshot to metadata storage.

Compatibility, Deprecation, and Migration Plan

...