KAFKA-19566: Deprecate ClientQuotaCallback#updateClusterMetadata#21958
Merged
chia7712 merged 6 commits intoapache:trunkfrom Apr 6, 2026
Merged
KAFKA-19566: Deprecate ClientQuotaCallback#updateClusterMetadata#21958chia7712 merged 6 commits intoapache:trunkfrom
chia7712 merged 6 commits intoapache:trunkfrom
Conversation
chia7712
reviewed
Apr 4, 2026
| * @param cluster Cluster metadata including partitions and their leaders if known | ||
| * @return true if quotas have changed and metric configs may need to be updated | ||
| */ | ||
| @Deprecated(since = "4.4", forRemoval = true) |
Member
There was a problem hiding this comment.
Would it be better to provide a default implementation to ensure a smooth migration? This would relieve users from having to implement a deprecated method
chia7712
reviewed
Apr 4, 2026
|
|
||
| @SuppressWarnings("removal") | ||
| @Override | ||
| public boolean updateClusterMetadata(Cluster cluster) { |
|
|
||
| override def quotaLimit(quotaType: ClientQuotaType, metricTags: Map[String, String]): java.lang.Double = 1 | ||
| @SuppressWarnings(Array("removal")) | ||
| override def updateClusterMetadata(cluster: Cluster): Boolean = false |
| } | ||
|
|
||
| @SuppressWarnings("removal") | ||
| @Override |
chia7712
reviewed
Apr 4, 2026
Member
chia7712
left a comment
There was a problem hiding this comment.
@brandboat would you mind adding this change to upgrade.md?
chia7712
approved these changes
Apr 5, 2026
m1a2st
approved these changes
Apr 5, 2026
nileshkumar3
pushed a commit
to nileshkumar3/kafka
that referenced
this pull request
Apr 15, 2026
…he#21958) This method was unsupported in KRaft mode until Kafka 4.0, but the implementation has known issues: memory pressure from immutable Cluster objects on every update, confusing/irrelevant fields in KRaft context, and inconsistent partition info due to listener parsing differences. KIP-1162 proposed a redesign, but given the method went years without user complaints, we're deprecating it now and removing it in Kafka 5.0. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Ken Huang <s7133700@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This method was unsupported in KRaft mode until Kafka 4.0, but the
implementation has known issues: memory pressure from immutable Cluster
objects on every update, confusing/irrelevant fields in KRaft context,
and inconsistent partition info due to listener parsing differences.
KIP-1162 proposed a redesign, but given the method went years without
user complaints, we're deprecating it now and removing it in Kafka 5.0.
Reviewers: Chia-Ping Tsai chia7712@gmail.com, Ken Huang
s7133700@gmail.com