RockteMQ-AI commented on issue #10756: URL: https://github.com/apache/rocketmq/issues/10756#issuecomment-5158442507
**Issue Evaluation** Category: `type/bug` | Status: **Confirmed** The reported issue has been verified against the current codebase at `a06836d`. **Root Cause:** `ConsumeQueue.putMessagePositionInfoWrapper` (line 736) calls `consumeQueueExt.put(cqExtUnit)` unconditionally **before** `putMessagePositionInfo` performs the idempotency guard at line 839 (`offset + size <= maxPhysicOffset`). On duplicate dispatch, the CQ entry is correctly skipped but the CQExt unit is already persisted — leaving an unreferenced orphan. **Impact:** CommitLog recovery and idempotent dispatch replays accumulate unreachable CQExt units, causing persistent space amplification in the extension file. **Severity:** Medium — data integrity is preserved (main CQ is correct), but CQExt files grow unboundedly under replay-heavy workloads. **Suggested fix direction:** Move the `consumeQueueExt.put` call after the idempotency check in `putMessagePositionInfo`, or gate it on the return value. 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]
