[KIP-546] Add client quota Admin APIs - #5560
Open
Honglei (honglei) wants to merge 5 commits into
Open
Conversation
Implement DescribeClientQuotas and AlterClientQuotas admin client APIs as defined in KIP-546 (https://cwiki.apache.org/confluence/display/KAFKA/KIP-546%3A+Configurable+Quota+Management). DescribeClientQuotas retrieves quota configurations for one or more entity filters (user, client-id, or IP). AlterClientQuotas sets or removes quota values for specified entity combinations. New public types: - rd_kafka_ClientQuotaFilter_t: filter by entity type and match type (EXACT, DEFAULT, or ANY). - rd_kafka_ClientQuotaEntry_t: quota entity + operation (SET/REMOVE). - Result accessors: rd_kafka_DescribeClientQuotas_result_entries(), rd_kafka_AlterClientQuotas_result_entries(). Example programs added in examples/describe_client_quotas.c and examples/alter_client_quotas.c.
Add test 0154 (TEST_F_LOCAL) covering DescribeClientQuotas and AlterClientQuotas admin API entry points without requiring a live broker. Tests verify: - NULL argument handling returns RD_KAFKA_RESP_ERR__INVALID_ARG - Async call enqueues an event that times out (no broker) returning RD_KAFKA_RESP_ERR__TIMED_OUT for both queue and no-queue variants - Both RD_KAFKA_PRODUCER and RD_KAFKA_CONSUMER client types
Correct the public API and protocol handling for client quota admin requests, including strict filter semantics and v0/v1 negotiation. Register a real broker test in addition to local validation, and harden the examples and result lifecycle.
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
2 tasks
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.
Summary
AlterClientQuotasandDescribeClientQuotasC Admin APIs from KIP-546validate_onlyand strict filtering semanticsThis is a rebased and reviewed continuation of #5368 and preserves Amit Barzilai's four original commits and authorship. The follow-up commit resolves the current
masterconflicts and correctness/test gaps found during integration review.Closes #5227.
Validation
./configure --enable-devel --enable-werror && make -j8test-runner0006_symbols,0080_admin_ut,0154_admin_quota_utAll checks above passed.