You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Brian Byrne (Jira)" <ji...@apache.org> on 2020/05/21 15:16:00 UTC

[jira] [Assigned] (KAFKA-9980) Text encoding bug prevents correctly setting client quotas for default entities

     [ https://issues.apache.org/jira/browse/KAFKA-9980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Byrne reassigned KAFKA-9980:
----------------------------------

    Assignee: Brian Byrne  (was: Cheng Tan)

> Text encoding bug prevents correctly setting client quotas for default entities
> -------------------------------------------------------------------------------
>
>                 Key: KAFKA-9980
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9980
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Cheng Tan
>            Assignee: Brian Byrne
>            Priority: Major
>
> quota_tests.py is failing. Specifically for this test:
> {quote}
>  [INFO:2020-05-11 19:22:47,493]: RunnerClient: Loading test \{'directory': '/opt/kafka-dev/tests/kafkatest/tests/client', 'file_name': 'quota_test.py', 'method_name': 'test_quota', 'cls_name': 'QuotaTest', 'injected_args': {'quota_type': 'client-id', 'override_quota': False}}
> {quote}
>  
> I log into the docker container and do
>  
> {quote}
>  /opt/kafka-dev/bin/kafka-configs.sh --bootstrap-server ducker03:9093 --describe --entity-type clients --command-config /opt/kafka-dev/bin/hi.properties
> {quote}
>  
>  and the command return
>  
> {quote}Configs for the default client-id are consumer_byte_rate=2000000.0, producer_byte_rate=2500000.0
>  Configs for client-id 'overridden_id' are consumer_byte_rate=1.0E9, producer_byte_rate=1.0E9
>  Seems like the config is properly but the quota is not effective
>   
> {quote}
>  For investigation, I added a logging at 
> {quote}{{AdminZKClient.changeConfigs()}}
> {quote}
>  
>  
> {quote}def changeConfigs(entityType: String, entityName: String, configs: Properties): Unit =
> {
>         warn(s"entityType = $entityType entityName = $entityName configs = $configs") ...
> }
> {quote}
> And use --bootstrap-server and --zookeeper to --alter the default client quota. I got
>  
> {quote}
>  Alter with --zookeeper:WARN entityType = clients entityName = <default> configs = \{producer_byte_rate=1000000000, consumer_byte_rate=1000000000} (kafka.zk.AdminZkClient)
> {quote}
>  
>  and
>  
> {quote}
>  Alter with --bootstrap-server:WARN entityType = clients entityName = %3Cdefault%3E configs = \{producer_byte_rate=1000000000, consumer_byte_rate=1000000000} (kafka.zk.AdminZkClient)
> {quote}
>  
>  I guess the encoding difference might cause the issue. The encoding happens in
>  
> {quote}
>  Sanitizer.sanitize()
> {quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)