lucliu1108 opened a new pull request, #23820: URL: https://github.com/apache/kafka/pull/23820
## Summary `CreateTopics` and `DescribeConfigs` computed effective topic configs in two separate code paths. `CreateTopics` used `KafkaConfigSchema.resolveEffectiveTopicConfigs` on the controller. `DescribeConfigs` built a `LogConfig` from `KafkaConfig.extractLogConfigMap` and derived the config source from the synonyms list. The two paths could return different values or config sources for the same topic. To solve this: `DescribeConfigs` now also calls `resolveEffectiveTopicConfigs`, and takes the value, config source and documentation of each topic config from the returned `ConfigEntry`. The synonyms list is still built by `ConfigHelper`. `resolveEffectiveTopicConfigs` now normalizes non-sensitive values by parsing them with the config type and serializing them again. For example, a topic config set to "delete, compact" is returned as "delete,compact" by both APIs. Previously, `CreateTopics` returned such values as they were set. This PR also fixes another side problem: The synonyms list for topic configs whose highest-priority broker synonym is unset. `configSynonyms` used to drop every entry before the described name, and for topic configs that name is the highest-priority broker synonym. e.g. With only `log.retention.minutes` or `log.retention.hours` set, retention.ms therefore returned an empty synonyms list, and the config source fell back to `DEFAULT_CONFIG`. The same applied to `segment.ms` with only `log.roll.hours` set. The drop now applies only when describing broker and group configs. -- 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]
