RockteMQ-AI commented on issue #11412:
URL: https://github.com/apache/rocketmq/issues/11412#issuecomment-6145148679

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase.
   
   **Root Cause:** `BatchConsumeQueue.getMinMsgOffset(MappedFile)` does not 
check for `null` input, while `getMaxMsgOffset()` does. When the queue is 
empty, `getLastMappedFile()` returns `null`, causing NPE in 
`getOffsetInQueueByTime()` and related operations.
   
   **Impact:** Operations like `cleanExpiredConsumerQueue` and timestamp-based 
offset queries fail with NPE on empty `BatchConsumeQueue` instances.
   
   **Severity:** Medium — affects queue lifecycle management and time-based 
queries.
   
   The proposed fix (adding null check in `getMinMsgOffset` consistent with 
`getMaxMsgOffset`) is correct. Looking forward to the PR.
   
   ---
   *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: [email protected]

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

Reply via email to