CalvinConfluent commented on code in PR #15702: URL: https://github.com/apache/kafka/pull/15702#discussion_r1616598075
########## 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: I used a `OrderedConfigResolver` later to solve the problem that we have to look up both pending config data and current config. -- 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