[ https://issues.apache.org/jira/browse/KAFKA-16211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17819095#comment-17819095 ]
Deng Ziming commented on KAFKA-16211: ------------------------------------- {code:java} // code placeholder @ExtendWith(value = Array(classOf[ClusterTestExtensions])) @ClusterTestDefaults(clusterType = Type.ALL, brokers = 1) class Test(cluster: ClusterInstance) { @BeforeEach def setup(config: ClusterConfig): Unit = { config.serverProperties().setProperty("log.segment.bytes", "573741824") } @ClusterTest def test(): Unit = { // KAFKA-16211 val topic = "mytopic" val resource = new ConfigResource(ConfigResource.Type.TOPIC, topic) val newTopics = Seq(new NewTopic(topic, 1, 1.toShort)) val admin = cluster.createAdminClient() val create = admin.createTopics(newTopics.asJava).config(topic).get().get("segment.bytes") val describe = admin.describeConfigs(Collections.singletonList(resource)).values().get(resource).get().get("segment.bytes") println(s"create $create \ndescribe: $describe") } } {code} This can be reproduced using the code above with some adjustment to `KafkaClusterTestKit.Builder.createNodeConfig` , it seems we should use "log.segment.bytes" instead of "segment.bytes". > Inconsistent config values in CreateTopicsResult and DescribeConfigsResult > -------------------------------------------------------------------------- > > Key: KAFKA-16211 > URL: https://issues.apache.org/jira/browse/KAFKA-16211 > Project: Kafka > Issue Type: Bug > Components: controller > Reporter: Gantigmaa Selenge > Priority: Minor > > When creating a topic in KRaft cluster, a config value returned in > CreateTopicsResult is different than what you get from describe topic > configs, if the config was set in broker.properties or controller.properties > or in both but with different values. > > For example, start a broker with `segment.bytes` set to 573741824 in the > properties file and then create a topic, the CreateTopicsResult contains: > ConfigEntry(name=segment.bytes, value=1073741824, source=DEFAULT_CONFIG, > isSensitive=false, isReadOnly=false, synonyms=[], type=INT, > documentation=null) > because the controller was started without setting this config. > However when you describe configurations for the same topic, the config value > set by the broker is returned: > Create topic configsConfigEntry(name=segment.bytes, value=573741824, > source=STATIC_BROKER_CONFIG, isSensitive=false, isReadOnly=false, > synonyms=[], type=null, documentation=null) > > Vice versa, if the controller is started with this config set to a different > value, the create topic request returns the value set by the controller and > then when you describe the config for the same topic, you get the value set > by the broker. This makes it confusing to understand which value being is > used. -- This message was sent by Atlassian Jira (v8.20.10#820010)