see-quick commented on code in PR #21384:
URL: https://github.com/apache/kafka/pull/21384#discussion_r2768955725


##########
server-common/src/main/java/org/apache/kafka/server/config/QuotaConfig.java:
##########
@@ -212,17 +224,7 @@ public int controllerQuotaWindowSizeSeconds() {
     }
 
     public static ConfigDef brokerQuotaConfigs() {
-        return new ConfigDef()
-                // Round minimum value down, to make it easier for users.
-                .define(QuotaConfig.LEADER_REPLICATION_THROTTLED_RATE_CONFIG, 
ConfigDef.Type.LONG,
-                        QuotaConfig.QUOTA_BYTES_PER_SECOND_DEFAULT, 
ConfigDef.Range.atLeast(0),
-                        ConfigDef.Importance.MEDIUM, 
QuotaConfig.LEADER_REPLICATION_THROTTLED_RATE_DOC)
-                
.define(QuotaConfig.FOLLOWER_REPLICATION_THROTTLED_RATE_CONFIG, 
ConfigDef.Type.LONG,
-                        QuotaConfig.QUOTA_BYTES_PER_SECOND_DEFAULT, 
ConfigDef.Range.atLeast(0),
-                        ConfigDef.Importance.MEDIUM, 
QuotaConfig.FOLLOWER_REPLICATION_THROTTLED_RATE_DOC)
-                
.define(QuotaConfig.REPLICA_ALTER_LOG_DIRS_IO_MAX_BYTES_PER_SECOND_CONFIG, 
ConfigDef.Type.LONG,
-                        QuotaConfig.QUOTA_BYTES_PER_SECOND_DEFAULT, 
ConfigDef.Range.atLeast(0),
-                        ConfigDef.Importance.MEDIUM, 
QuotaConfig.REPLICA_ALTER_LOG_DIRS_IO_MAX_BYTES_PER_SECOND_DOC);
+        return BROKER_QUOTA_CONFIG_DEF;

Review Comment:
   Hmm, I think problem is more deeper ... In the, we can see   
https://github.com/apache/kafka/blob/9d5bbf58277133ea2793cdbfbb75e68beac16117/server/src/main/java/org/apache/kafka/server/config/DynamicConfig.java#L36-L43
   
   I don't why there is `QuotaConfig.brokerQuotaConfigs();` as other configs is 
loaded from  `ALL_DYNAMIC_CONFIGS`. Maybe that's because someone forgot to 
include it inside the `ALL_DYNAMIC_CONFIGS` backthen... 
   
   Anyway, I have removed/replaced `ConfigDef configs = 
QuotaConfig.brokerQuotaConfigs()` as it is already included and defined in the 
`ALL_DYNAMIC_CONFIGS`, and it seems to work. Also checked the website and 
showing the right values.
   
   Let me know what you think.



-- 
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]

Reply via email to