RockteMQ-AI commented on issue #10962:
URL: https://github.com/apache/rocketmq/issues/10962#issuecomment-5397184928
**Issue Evaluation**
Category: `type/enhancement` | Status: **Evaluated**
**Feasibility:** Feasible
**Scope:** `proxy` module — `ClientProcessor#syncLiteSubscription`
**Compatibility:** No breaking changes
The current implementation validates `liteTopicSet.size()` against
`liteSubClientQuota + quotaBuffer` for **all** actions (line 119–121 in
`ClientProcessor.java`), including remove actions. This is logically
inconsistent — quota validation is designed to limit subscription **growth**,
but remove actions (`PARTIAL_REMOVE`, `COMPLETE_REMOVE`) **reduce** the active
subscription set and should not be blocked.
**Proposed fix:** Wrap the `validateLiteSubscriptionQuota` call inside a
condition that checks for add actions only:
```java
if (CollectionUtils.isNotEmpty(liteSubscriptionDTO.getLiteTopicSet())) {
LiteSubscriptionAction action = liteSubscriptionDTO.getAction();
if (LiteSubscriptionAction.PARTIAL_ADD == action
|| LiteSubscriptionAction.COMPLETE_ADD == action) {
validateLiteSubscriptionQuota(ctx, liteSubscriptionDTO.getGroup(),
liteSubscriptionDTO.getLiteTopicSet().size());
}
}
```
This is a targeted, low-risk change. The quota protection for subscription
growth is preserved while allowing large unsubscribe requests to proceed
normally.
---
*Automated evaluation by RockteMQ-AI*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]