You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Chhida (via GitHub)" <gi...@apache.org> on 2026/06/05 13:20:25 UTC

[PR] KAFKA-20651: Cache parsed KafkaPrincipal in StandardAcl (#v1) [kafka]

Chhida opened a new pull request, #22482:
URL: https://github.com/apache/kafka/pull/22482

   Use ConcurrentHashMap to cache parsed KafkaPrincipal objects per unique principal string, reducing allocation overhead from repeated substring/constructor calls during ACL authorization.
   
   Reviewers: TBD
   
   Delete this text and replace it with a detailed description of your change. The 
   PR title and body will become the squashed commit message.
   
   If you would like to tag individuals, add some commentary, upload images, or
   include other supplemental information that should not be part of the eventual
   commit message, please use a separate comment.
   
   If applicable, please include a summary of the testing strategy (including 
   rationale) for the proposed change. Unit and/or integration tests are expected
   for any behavior change and system tests should be considered for larger
   changes.
   
   `(data-plane-kafka-request-handler-0" #80 daemon prio=5 os_prio=0 cpu=17207014.77ms elapsed=18143.19s tid=0x00007f76d50aa800 nid=0x8e7bb runnable [0x00007f7681480000]
   
     java.lang.Thread.State: RUNNABLE
   
          at org.apache.kafka.metadata.authorizer.StandardAcl.kafkaPrincipal(StandardAcl.java:106)
   
          at org.apache.kafka.metadata.authorizer.StandardAuthorizerData.findResult(StandardAuthorizerData.java:493)
   
          at org.apache.kafka.metadata.authorizer.StandardAuthorizerData.checkSection(StandardAuthorizerData.java:428)
   
          at org.apache.kafka.metadata.authorizer.StandardAuthorizerData.findAclRule(StandardAuthorizerData.java:367)
   
          at org.apache.kafka.metadata.authorizer.StandardAuthorizerData.authorize(StandardAuthorizerData.java:247)
   
          at org.apache.kafka.metadata.authorizer.StandardAuthorizer.authorize(StandardAuthorizer.java:143)
   
          at kafka.server.AuthHelper.filterByAuthorized(AuthHelper.scala:113)
   
          at kafka.server.KafkaApis.handleTopicMetadataRequest(KafkaApis.scala:1350)
   
          at kafka.server.KafkaApis.handle(KafkaApis.scala:192)
   
          at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:159)
   
          at java.lang.Thread.run(java.base@11.0.25/Thread.java:829)
   
   )`


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20651: Cache parsed KafkaPrincipal in StandardAcl (#v1) [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22482:
URL: https://github.com/apache/kafka/pull/22482#issuecomment-4697508410

   A label of 'needs-attention' was automatically added to this PR in order to raise the
   attention of the committers. Once this issue has been triaged, the `triage` label
   should be removed to prevent this automation from happening again.


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20651: Cache parsed KafkaPrincipal in StandardAcl (#v1) [kafka]

Posted by "Chhida (via GitHub)" <gi...@apache.org>.
Chhida commented on PR #22482:
URL: https://github.com/apache/kafka/pull/22482#issuecomment-4731899267

   Closing this PR as it is superseded by #22532. That PR includes this KafkaPrincipal caching optimization, but also fixes the underlying O(N) ACL scan algorithmic issue by introducing a principal-level index.


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-20651: Cache parsed KafkaPrincipal in StandardAcl (#v1) [kafka]

Posted by "Chhida (via GitHub)" <gi...@apache.org>.
Chhida closed pull request #22482: KAFKA-20651: Cache parsed KafkaPrincipal in StandardAcl (#v1)
URL: https://github.com/apache/kafka/pull/22482


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org