chia7712 commented on code in PR #18641:
URL: https://github.com/apache/kafka/pull/18641#discussion_r1937322084


##########
core/src/main/scala/kafka/server/ClientQuotaManager.scala:
##########
@@ -451,10 +449,31 @@ class ClientQuotaManager(private val config: 
ClientQuotaManagerConfig,
     }
   }
 
+  private def getOrDefaultClient(
+    sanitizedClientId: Option[ClientQuotaEntity.ConfigEntity]
+  ): Option[ClientQuotaEntity.ConfigEntity] = {
+    if (sanitizedClientId.isEmpty)
+      None  
+    else if (sanitizedClientId.get.name() == DefaultString)
+      Some(DefaultClientIdEntity)
+    else {
+      val clientId = sanitizedClientId.map(s => Sanitizer.desanitize(s.name()))

Review Comment:
   we should handle the `ClientIdEntity` only.



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