RockteMQ-AI commented on issue #11057: URL: https://github.com/apache/rocketmq/issues/11057#issuecomment-5566579247
**Issue Evaluation** Category: `type/bug` | Status: **Confirmed** The reported issue has been verified against the current codebase at `develop` branch. **Root Cause:** `LiteConsumerLagCalculator` caches lag timestamps in a `ConcurrentHashMap<TopicGroup, PriorityBlockingQueue<LagTimeInfo>>`. When TTL cleanup (`AbstractLiteLifecycleManager.deleteLmq()`) removes a LiteTopic's queue, offsets, and subscriptions, it does **not** call `removeLagInfo()` to clear the cached timestamps. Both `calculateLiteLagLatency()` and `getLagTimestampTopK()` continue to use these stale entries without checking queue existence. **Impact:** - Metric pollution: lag latency reports include stale timestamps from deleted topics - TopK pollution: `getLagTimestampTopK` returns entries for deleted queues - Memory leak: `LagTimeInfo` entries accumulate indefinitely in the cache **Severity:** medium — affects monitoring accuracy and can cause memory growth over time **Fix location:** `AbstractLiteLifecycleManager.deleteLmq()` should call `removeLagInfo()` for each subscriber group, similar to how it already cleans offsets and subscriptions. An automated fix proposal will be generated. Reply `/approve` to proceed with PR generation. --- *Automated evaluation by github-manager* -- 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]
