RockteMQ-AI commented on issue #10256: URL: https://github.com/apache/rocketmq/issues/10256#issuecomment-5327949889
**Issue Evaluation** Category: `bug` | Status: **Confirmed** The shared mutable `batchAckIndexList` race condition is a valid concurrency bug. When `enablePopBatchAck=true` and `appendAckAsync=true`, the list reference is passed to `putBatchAckToStore()` for async write, then immediately cleared in the `finally` block. The async callback captures the same reference, so by the time it executes, the list is already empty or contains stale data. **Root Cause:** Shared mutable state — `batchAckIndexList` is reused across iterations without defensive copying before async dispatch. **Impact:** `toStoreBits` never updates correctly → `isCkDoneForFinish()` always returns false → `commitOffsets` queue grows unboundedly → OOM. **Severity:** High (memory leak leading to production OOM) Suggested fix: Create a defensive copy of the index list before passing it to `putBatchAckToStore()`, so the async callback operates on an immutable snapshot. --- *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]
