cmccabe commented on code in PR #15702: URL: https://github.com/apache/kafka/pull/15702#discussion_r1614157582
########## metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java: ########## @@ -443,9 +525,33 @@ Map<String, String> getConfigs(ConfigResource configResource) { * @param configKey The key for the config. */ String getTopicConfig(String topicName, String configKey) throws NoSuchElementException { - Map<String, String> map = configData.get(new ConfigResource(Type.TOPIC, topicName)); + return getTopicConfigWithPendingChange(topicName, configKey, configData); + } + + /** + * Get the config value for the give topic and give config key. Also, it will search the configs in the pending + * config data first. + * If the config value is not found, return null. + * + * @param topicName The topic name for the config. + * @param configKey The key for the config. + * @param pendingConfigData The configs which is going to be applied. It should have the higher priority than + * the current configs. + */ + String getTopicConfigWithPendingChange( + String topicName, + String configKey, + Map<ConfigResource, TimelineHashMap<String, String>> pendingConfigData Review Comment: It seems like there could be some value in turning the pending config change into a class of its own, if we're going to be querying it like this. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org