RockteMQ-AI commented on issue #11354: URL: https://github.com/apache/rocketmq/issues/11354#issuecomment-6096386301
**Issue Evaluation** Category: `type/bug` | Status: **Confirmed** The reported issue has been verified against the current codebase (`develop` branch, commit `9ea2ccdc2b41`). **Root Cause:** In `LiteSubscriptionRegistryImpl.excludeClientByLmqName`, when an evicted client's last liteTopic is taken, the client is immediately removed from `client2Subscription` (lines 345-347). Its tombstone entry in `exclusiveEvictionTombstones` persists, but none of the 3 cleanup paths can fire if the client terminates without sending `COMPLETE_REMOVE`: - Path 1 (`addPartialSubscription` → `remove`) — requires client request - Path 2 (`addCompleteSubscription` → `removeStale`) — requires client request - Path 3 (`removeCompleteSubscription` → `removeAllOf` via `cleanupExpiredSubscriptions`) — only walks `client2Subscription`, which no longer contains the evicted clientId **Impact:** Under exclusive-mode client churn (autoscaling, rolling restarts), the tombstone set grows unboundedly — an O(number of takeovers) memory leak of `clientId$lmqName` keys held for the broker's lifetime. **Severity:** Medium — requires sustained exclusive-mode churn to become significant, but is a grow-only leak with no recovery path. **Precondition confirmed:** The leak only occurs when eviction empties the client's lmq set; if other liteTopics remain, `client2Subscription` (and thus expiry cleanup) still covers it. An automated fix proposal will be generated. Reply `/approve` to proceed with PR generation. --- *Automated evaluation by github-manager-bot* -- 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]
