cmccabe commented on a change in pull request #10463: URL: https://github.com/apache/kafka/pull/10463#discussion_r614404680
########## File path: metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java ########## @@ -1119,6 +1148,113 @@ void validateManualPartitionAssignment(List<Integer> assignment, } } + /** + * Handle legacy configuration alterations. + */ + ControllerResult<Map<ConfigResource, ApiError>> legacyAlterConfigs( + Map<ConfigResource, Map<String, String>> newConfigs) { + ControllerResult<Map<ConfigResource, ApiError>> result = + configurationControl.legacyAlterConfigs(newConfigs); + return alterConfigs(result); + } + + /** + * Handle incremental configuration alterations. + */ + ControllerResult<Map<ConfigResource, ApiError>> incrementalAlterConfigs( + Map<ConfigResource, Map<String, Entry<OpType, String>>> configChanges) { + ControllerResult<Map<ConfigResource, ApiError>> result = + configurationControl.incrementalAlterConfigs(configChanges); + return alterConfigs(result); + } + + /** + * If important controller configurations were changed, generate records which will + * apply the changes. + */ + ControllerResult<Map<ConfigResource, ApiError>> alterConfigs( + ControllerResult<Map<ConfigResource, ApiError>> result) { + ElectionStrategizer strategizer = examineConfigAlterations(result.records()); + boolean isAtomic = true; + List<ApiMessageAndVersion> records = result.records(); + if (strategizer != null) { + records.addAll(handleLeaderElectionConfigChanges(strategizer)); + isAtomic = false; Review comment: I changed the approach here in the latest PR. Now, rather than combining the records into a single list, I schedule another task to scan through the offline partitions. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org