You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "f1amingo (via GitHub)" <gi...@apache.org> on 2026/07/31 10:05:40 UTC
[I] [Bug] Lite Topic may not be cleaned up when message store timestamp is unavailable [rocketmq]
f1amingo opened a new issue, #10722:
URL: https://github.com/apache/rocketmq/issues/10722
### Before Creating the Bug Report
- [x] I found a bug, not just asking a question.
- [x] I have searched the GitHub Issues and Discussions and believe this is not a duplicate.
- [x] I have confirmed this bug belongs to the current repository.
### Runtime platform environment
OS: Linux
### RocketMQ version
branch: develop
### JDK Version
Compiler: JDK 11
### Describe the Bug
In `AbstractLiteLifecycleManager#isLiteTopicExpired`, when `getMessageStoreTimeStamp` returns a non-positive value (e.g., message not found at the given offset, or the message store returns an invalid timestamp), the method proceeds to compute `inactiveTime = System.currentTimeMillis() - latestStoreTime` with an invalid base, resulting in undefined behavior.
### Steps to Reproduce
1. A Lite Topic has valid maxOffset > 0
2. `getMessageStoreTimeStamp` returns 0 or -1 (e.g., the message at `maxOffset - 1` has been physically deleted or is temporarily unreadable)
3. `isLiteTopicExpired` computes an unreliable inactiveTime
### What Did You Expect to See?
When the store timestamp is unavailable (<= 0), the Lite Topic should be treated as expired to trigger cleanup.
### What Did You See Instead?
The method uses the invalid timestamp for arithmetic, leading to unreliable expiration judgment.
### Additional Context
None
--
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: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Lite Topic may not be cleaned up when message store timestamp is unavailable [rocketmq]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed issue #10722: [Bug] Lite Topic may not be cleaned up when message store timestamp is unavailable
URL: https://github.com/apache/rocketmq/issues/10722
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Lite Topic may not be cleaned up when message store timestamp is unavailable [rocketmq]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #10722:
URL: https://github.com/apache/rocketmq/issues/10722#issuecomment-5142193962
**Issue Evaluation**
Category: `type/bug` | Status: **Confirmed**
The reported issue has been verified against the current codebase on the `develop` branch.
**Root Cause:** In `AbstractLiteLifecycleManager#isLiteTopicExpired` (line 183-184), `getMessageStoreTimeStamp(lmqName, 0, maxOffset - 1)` may return 0 or a negative value when the message at the given offset has been physically deleted or is temporarily unreadable. The code proceeds to compute `inactiveTime = System.currentTimeMillis() - latestStoreTime` without validating `latestStoreTime`, resulting in an extremely large `inactiveTime` that causes unreliable expiration judgment.
**Impact:** Lite Topics may be incorrectly judged as expired (or not expired depending on the sign), leading to premature cleanup or resource leaks.
**Severity:** Medium — affects Lite Topic lifecycle management under edge conditions (message deletion / store unavailability).
**Suggested Fix:** Add a validity check for `latestStoreTime` after the `getMessageStoreTimeStamp` call. When `latestStoreTime <= 0`, treat the topic as potentially expired (consistent with the existing `maxOffset <= 0` handling pattern).
An automated fix proposal will be generated. Reply `/approve` to proceed with PR generation.
---
*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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org