0xffff-zhiyan commented on code in PR #21053:
URL: https://github.com/apache/kafka/pull/21053#discussion_r2692135408
##########
metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java:
##########
@@ -327,6 +338,13 @@ private ApiError validateAlterConfig(
Map<String, String> alteredConfigsForAlterConfigPolicyCheck = new
HashMap<>();
TimelineHashMap<String, String> existingConfigsSnapshot =
configData.get(configResource);
if (existingConfigsSnapshot != null) {
+ if (configValidator != null) {
+ for (String name : existingConfigsSnapshot.keySet()) {
+ if (!configValidator.isValidConfig(configResource.type(),
name)) {
+ existingConfigsSnapshot.remove(name);
Review Comment:
Yes we can. But `ControllerConfigurationValidator` is initialized in
`ControllerServer`.
https://github.com/apache/kafka/blob/e376801f71a6b4235beb21a0210d36c168bac238/core/src/main/scala/kafka/server/ControllerServer.scala#L248
How can we pass it through from `SharedServer` all the way down to
`ConfigurationDelta`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]