Before Creating the Enhancement Request
Summary
Improve Lite subscription quota validation in proxy by applying the quota check only to Lite subscription add actions.
Currently, proxy validates liteTopicSet.size() against liteSubClientQuota + quotaBuffer before syncing Lite subscriptions. This validation should apply to PARTIAL_ADD and COMPLETE_ADD, but not to remove actions.
Motivation
Lite subscription quota is used to limit subscription growth. Remove actions release existing subscriptions and should not be blocked by the same quota validation.
For example, a client may add Lite subscriptions in several smaller PARTIAL_ADD requests and later remove them in one larger PARTIAL_REMOVE request. The remove request can contain more Lite topics than the quota threshold, but it only reduces the active subscription set.
Describe the Solution You'd Like
Update ClientProcessor#syncLiteSubscription so that Lite subscription quota validation is only applied to add actions:
Skip this quota validation for remove actions:
PARTIAL_REMOVE
COMPLETE_REMOVE
This keeps the quota protection for subscription growth while allowing large unsubscribe requests to release resources normally.
Describe Alternatives You've Considered
One alternative is to keep validating all actions with non-empty liteTopicSet, but this treats remove requests as if they were adding subscriptions.
Another alternative is to introduce a separate request-size limit for Lite subscription sync requests. That may be useful independently, but it should not reuse LITE_SUBSCRIPTION_QUOTA_EXCEEDED, because subscription quota and request size are different concepts.
Additional Context
No response
Before Creating the Enhancement Request
Summary
Improve Lite subscription quota validation in proxy by applying the quota check only to Lite subscription add actions.
Currently, proxy validates
liteTopicSet.size()againstliteSubClientQuota + quotaBufferbefore syncing Lite subscriptions. This validation should apply toPARTIAL_ADDandCOMPLETE_ADD, but not to remove actions.Motivation
Lite subscription quota is used to limit subscription growth. Remove actions release existing subscriptions and should not be blocked by the same quota validation.
For example, a client may add Lite subscriptions in several smaller
PARTIAL_ADDrequests and later remove them in one largerPARTIAL_REMOVErequest. The remove request can contain more Lite topics than the quota threshold, but it only reduces the active subscription set.Describe the Solution You'd Like
Update
ClientProcessor#syncLiteSubscriptionso that Lite subscription quota validation is only applied to add actions:PARTIAL_ADDCOMPLETE_ADDSkip this quota validation for remove actions:
PARTIAL_REMOVECOMPLETE_REMOVEThis keeps the quota protection for subscription growth while allowing large unsubscribe requests to release resources normally.
Describe Alternatives You've Considered
One alternative is to keep validating all actions with non-empty
liteTopicSet, but this treats remove requests as if they were adding subscriptions.Another alternative is to introduce a separate request-size limit for Lite subscription sync requests. That may be useful independently, but it should not reuse
LITE_SUBSCRIPTION_QUOTA_EXCEEDED, because subscription quota and request size are different concepts.Additional Context
No response