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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to