RockteMQ-AI commented on issue #10736: URL: https://github.com/apache/rocketmq/issues/10736#issuecomment-5149498088
**Issue Evaluation** Category: `type/bug` | Status: **Confirmed** The reported issue has been verified against the current codebase. **Root Cause:** `PopConsumerCache.cleanupRecords` stages eligible records into `removeTreeMap`, copies them into `writeConsumerRecords`, and persists that snapshot. During the store write, a concurrent ACK for the same record calls `deleteRecords`, which only checks `recordTreeMap` — it cannot find the staged record and delegates deletion to the durable KV store. The ACK deletes the checkpoint and returns success, after which the in-progress cleanup write re-persists the stale snapshot, restoring the acknowledged checkpoint. **Impact:** Message deduplication guarantee is violated — a previously acknowledged message can be re-delivered after a broker restart or scan. This affects POP consumption semantics. **Severity:** **High** — data-plane correctness issue in POP consumption path. **Note:** As the reporter correctly identified, PR #10519 touches adjacent `PopConsumerCache` and change-invisibility code. Any fix for this issue must be coordinated with that PR to avoid conflicting semantics and changed files. The fix should define whether staged records remain addressable by ACK/change-invisibility operations, and preserve ordering between checkpoint persistence and consumer-offset advancement. An automated fix proposal will be generated after PR #10519 coordination is clarified. Reply `/approve` to proceed with PR generation once the coordination concern is resolved. --- *Automated evaluation by github-manager* -- 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]
