DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
Discussion thread: https://lists.apache.org/thread/xd28mgqy75stgsvp6qybzpljzflkqcsy https://lists.apache.org/thread/m9pvhgfwtr05rf9sdhn22x11cvtbgv6w
JIRA: https://issues.apache.org/jira/browse/KAFKA-16181
Released: 4.0.0
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Note
This KIP is not finished promptly is release-3.8 and is moved to release-4.0, so we made some discussion again and made some concise change here: https://lists.apache.org/thread/m9pvhgfwtr05rf9sdhn22x11cvtbgv6w , I strikethrough the designs for release-3.8 and replaced them with new designs following them in red color.
Motivation
We have 2 methods in AdminClient for updating config, alterConfigs and incrementalAlterConfigs , the former has many restrictions and has been deprecated from 2.3.0. However, It's still used in ConfigCommand to update broker config and is resulting in a bug
, so I'm inclined to move it to Jira server ASF JIRA serverId 5aa69414-a9e9-3523-82ec-879b028fb15b key KAFKA-13788 incrementalAlterConfigs and fallback to use alterConfigs if the server is under 2.3.0. There are some other reasons for this change:
...
When updating broker config, instead of using Admin.alterConfigs, we will use Admin.incrementalAlterConfigs and fallback to use is alterConfigs automatically if incrementalAlterConfigs is not supported, we are doing this heuristically instead of manually. throw an unsupported version error f incrementalAlterConfigs is not supported, which means the broker is prior to 2.3.0.
- We only do this when (--alter) and (--broker <broker-id>)/(--entity-types brokers) are specified, or it will be ignored, for example when updating topic configs.
- We only do this when (--bootstrap-server)/(bootstrap-controller) is specified, we are leaving zookeeper case unchanged.
- use Admin.
incrementalAlterConfigsfirstly, which will fail if the broker is before 2.3.0,and we will retry with Admin.alterConfigs()and we fail the command directly - AdminClient.alterConfigs is deprecated and will be remove In the future together, and AdminClient.
incrementalAlterConfigswill be the only choice then.
...
in case 3 with new version client and old version server, we will try firstly as case 2, and fail with UnsupportedVersionException, and retry as case 31 and fail the command directly.
The result is expected to be the same for both way, except that we can avoid some issues for AdminClient.alterConfigs().
...