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

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   All three bugs have been verified against the current `develop` branch 
codebase:
   
   **Bug 1 — Memory leak in `resetOffsetTable`:**
   `queryThenEraseResetOffset()` in `ConsumerOffsetManager.java` removes the 
queueId from the inner map via `map.remove(queueId)`, but never removes the 
outer key when the inner map becomes empty. Additionally, 
`AbstractLiteLifecycleManager#deleteLmq()` cleans up `offsetTable`, 
`consumerOffset`, `consumerOrderInfo`, and `pullOffsetTable`, but does not 
clean `resetOffsetTable`, leaving orphaned entries.
   
   **Bug 2 — FIFO block bypass missing on reset:**
   `PopLiteMessageProcessor#isFifoBlocked()` (line 318) directly delegates to 
`consumerOrderInfoManager.checkBlock()` without checking whether a reset offset 
is pending. The reset offset handling (including `clearBlock`) only happens 
later in `getPopOffset()`, but `isFifoBlocked()` is called before 
`getPopOffset()` in the processing flow (line 304), so consumption is 
incorrectly blocked.
   
   **Bug 3 — Reset to offset 0 silently skipped:**
   `ResetOffsetByTimeCommand.java` line 143 uses `if (resetOffset > 0)` to 
guard the reset call. Since offset 0 is a valid offset, this condition 
incorrectly skips the reset. Should be `if (resetOffset >= 0)`.
   
   **Severity:** High — Bug 1 causes gradual memory growth; Bug 2 blocks 
consumption after reset; Bug 3 silently drops valid reset operations.
   
   An automated fix proposal can 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]

Reply via email to