[improve][broker] Add http produce backlog quota check#4
Open
[improve][broker] Add http produce backlog quota check#4
Conversation
15 tasks
- Add http produce backlog quota check for both destination_storage and message_age Signed-off-by: Dream95 <zhou_8621@163.com>
ed77c82 to
339a6b8
Compare
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.
Motivation
The binary protocol already performs check backlog quota in
ServerCnxwhen creating producers, but the HTTP REST API path was missing this validation.Modifications
publishSingleMessageToPartitionmethod for bothdestination_storageandmessage_agequota typesThe implementation follows the same pattern used in
ServerCnx.handleProducerwhere backlog quota checks are performed before allowing message production.Verifying this change
This change is already covered by existing tests, such as:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Changes to REST endpoints:
/persistent/{tenant}/{namespace}/{topic}/partitions/{partition}) now properly enforces backlog quota limits before publishing messages. When backlog quota is exceeded, the request will fail with an appropriate error, consistent with the binary protocol behavior.Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: