Skip to content

KAFKA-19782: Improve perfomance Authorizer.authorizeByResourceType by using Prefix Trie#20912

Open
ekuvardin wants to merge 17 commits into
apache:trunkfrom
ekuvardin:KAFKA-19782
Open

KAFKA-19782: Improve perfomance Authorizer.authorizeByResourceType by using Prefix Trie#20912
ekuvardin wants to merge 17 commits into
apache:trunkfrom
ekuvardin:KAFKA-19782

Conversation

@ekuvardin
Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/KAFKA-19782

  1. Add prefix Trie
  2. Add tests
  3. fix jmh bemchmarks bugs
  4. Change size of bemchmarks cause for 200 000 it leads to call GC before each iteration

@github-actions github-actions Bot added triage PRs from the community core Kafka Broker performance dependencies Pull requests that update a dependency file build Gradle build or GitHub Actions clients labels Nov 18, 2025
@github-actions
Copy link
Copy Markdown

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.

@github-actions
Copy link
Copy Markdown

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.

# Conflicts:
#	jmh-benchmarks/src/main/java/org/apache/kafka/jmh/acl/AuthorizeByResourceTypeSearch.java
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 9, 2025

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.

# Conflicts:
#	gradle/dependencies.gradle
@github-actions
Copy link
Copy Markdown

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.

Comment thread LICENSE-binary
- caffeine-3.2.0
- commons-beanutils-1.11.0
- commons-collections-3.2.2
- commons-collections4-4.5.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not 100% sure introducing a new client dependency is a good idea

Copy link
Copy Markdown
Contributor Author

@ekuvardin ekuvardin Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to find a PrefixTrie or PatriciaTrie in the libraries we already use, but without success.
I don’t consider writing our own implementation to be a good idea.
What makes the situation even worse is that we already have a version of commons-collections-3.2.2 used somewhere deep in the codebase, but it is not compatible with the newer commons-collections4-4.5.0 (they even split it into a separate “4” module specifically because of this).

If you have any other ideas, please drop me a message in my profile email. I will arrange meeting

Copy link
Copy Markdown
Contributor Author

@ekuvardin ekuvardin Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nikita-Shupletsov Shall we discuss this dependency with a wider group?

@github-actions github-actions Bot removed needs-attention triage PRs from the community labels Jan 15, 2026
@apoorvmittal10
Copy link
Copy Markdown
Contributor

Related PR with different approach: #20911

@ekuvardin
Copy link
Copy Markdown
Contributor Author

@apoorvmittal10 could you please review this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle build or GitHub Actions clients core Kafka Broker dependencies Pull requests that update a dependency file performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants