[ 
https://issues.apache.org/jira/browse/KAFKA-20129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18056734#comment-18056734
 ] 

Chia-Ping Tsai commented on KAFKA-20129:
----------------------------------------

the error can be reproduced by this test code
{code:java}
@ClusterTest(types = {Type.KRAFT})
public void test(ClusterInstance cluster) throws ExecutionException, 
InterruptedException {
    try (var admin = cluster.admin()) {
        admin.incrementalAlterConfigs(Map.of(new 
ConfigResource(ConfigResource.Type.BROKER, "0"), List.of(new AlterConfigOp(
                new ConfigEntry("laaaate", "1000"),
                AlterConfigOp.OpType.APPEND)))).all().get();
    }
}{code}

> Server error caused by appending/subtracting a non-existent config key
> ----------------------------------------------------------------------
>
>                 Key: KAFKA-20129
>                 URL: https://issues.apache.org/jira/browse/KAFKA-20129
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Minor
>
> {code:java}
>     def listType(configName: String, configKeys: Map[String, ConfigKey]): 
> Boolean = {
>       val configKey = configKeys(configName) // <-- root cause 
>       if (configKey == null)
>         throw new InvalidConfigurationException(s"Unknown config name: 
> $configName")
>       configKey.`type` == ConfigDef.Type.LIST
>     }
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to