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

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase at 
`a06836d`.
   
   **Root Cause:** `ConsumeQueue.truncateDirtyLogicFiles` has three early 
`return` statements (lines 461, 474, 477) inside the scanning loop that exit 
before reaching the `consumeQueueExt.truncateByMaxAddress(maxExtAddr)` call at 
line 496. The most common truncation path (entry with `offset >= phyOffset`) 
hits the `return` at line 461, skipping CQExt truncation entirely.
   
   **Impact:** Runtime truncation calls (from `DefaultMessageStore`, 
`CommitLog`, `DLedgerCommitLog`) leave orphaned CQExt units that persist 
between valid entries. While `recover()` does truncate ext independently during 
startup, runtime truncation leaks are not cleaned up until the next broker 
restart.
   
   **Severity:** Medium — similar to #10756, causes CQExt space amplification 
during runtime truncation events.
   
   **Suggested fix direction:** Ensure `consumeQueueExt.truncateByMaxAddress()` 
is called on all code paths, including the early-return branches. Consider 
restructuring to use a `try/finally` or moving the ext truncation before the 
early returns.
   
   An automated fix proposal can 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: [email protected]

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

Reply via email to