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

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

{quote}
If there is some API that is setting ConfigEntity#name to <default> for default 
quotas, I think that's just straightforwardly a bug that should be fixed in 4.0.
{quote}

there is no such case. Using "name=<default>" can't create default quota. We 
can add a test to ensure that scenario.

Currently, the issue I have observed is `ConfigEntity` used by callback. It 
return "<default> as name when it is the default quota. In the APIs doc, it 
says empty string will be returned if it is the default quota. However, both 
<default> and empty string are weird to me as the entity returned by 
Admin#describeClientQuotas is using `null` to represent default quota.

We can keep returning <default> to the callback to keep compatibility. Or we 
can add a "small" breaking change to the callback to align the value of entity 
to "null" 


> the zk-related path `<default>` is still existent in quota system, such as 
> `ConfigEntity#name` and metrics tags
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-18735
>                 URL: https://issues.apache.org/jira/browse/KAFKA-18735
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Chia-Ping Tsai
>            Assignee: Ming-Yen Chung
>            Priority: Minor
>             Fix For: 4.1.0, 4.0.1
>
>
> the `<default>` is a specific "flag" used by zk path to represent the 
> "default" quota. We don't expose it on Admin as we use `null` to represent 
> the default name [0], and in KAFKA-16411 we assumes `<default>` should be 
> removed from 4.0 with the end of ZK mode [1]
> However, the `<default>` is still used in two "public APIs"
> 1. ConfigEntity#name return <default> for default quotas. The docs say it 
> return empty string, but that is incorrect. see [2]
> -"client-id" -> "<default>" and "user" -> "<default>" are used in metrics tag 
> [3]-
>  
> [0] 
> https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/quota/ClientQuotaEntity.java#L44
> [1] 
> https://github.com/apache/kafka/blob/trunk/server-common/src/main/java/org/apache/kafka/server/config/ZooKeeperInternals.java#L24
> [2] 
> https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/ClientQuotaManager.scala#L79
> [3] 
> https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/server/ClientQuotaManager.scala#L479



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

Reply via email to