Skip to content

[ISSUE #10962] Fix lite subscription quota validation for remove actions - #10963

Open
yx9o wants to merge 1 commit into
apache:developfrom
yx9o:dev-10962
Open

[ISSUE #10962] Fix lite subscription quota validation for remove actions#10963
yx9o wants to merge 1 commit into
apache:developfrom
yx9o:dev-10962

Conversation

@yx9o

@yx9o yx9o commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

@RockteMQ-AI RockteMQ-AI left a comment

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.

Summary

This PR fixes a bug where validateLiteSubscriptionQuota was called for all lite subscription actions, including REMOVE operations. The fix correctly restricts quota validation to only ADD-type actions (PARTIAL_ADD, COMPLETE_ADD), since removing subscriptions frees quota rather than consuming it. The change is small, focused, and includes test coverage for the PARTIAL_REMOVE case. LGTM.


Automated review by github-manager-bot

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.52%. Comparing base (efa1be5) to head (b8d393c).

Files with missing lines Patch % Lines
...ache/rocketmq/proxy/processor/ClientProcessor.java 20.00% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #10963      +/-   ##
=============================================
- Coverage      48.58%   48.52%   -0.06%     
+ Complexity     13671    13656      -15     
=============================================
  Files           1381     1381              
  Lines         101475   101478       +3     
  Branches       13189    13190       +1     
=============================================
- Hits           49302    49244      -58     
- Misses         46176    46219      +43     
- Partials        5997     6015      +18     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RockteMQ-AI RockteMQ-AI left a comment

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.

Summary

Fixes quota validation being incorrectly applied to remove/unsubscribe actions in lite subscription sync. The validation should only gate additive operations (PARTIAL_ADD, COMPLETE_ADD), not removals.

Review

  • Correctness ✅ — The shouldValidateLiteSubscriptionQuota() guard correctly restricts quota checks to add actions only. Remove actions should never be blocked by quota limits.
  • Code quality ✅ — Clean extraction of the condition into a private method improves readability. The local variable action avoids repeated getAction() calls.
  • Tests ✅ — Test coverage added for the remove action path.

LGTM — straightforward and correct fix.


Automated review by github-manager-bot

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Improve Lite subscription quota validation for remove actions

3 participants