RockteMQ-AI commented on issue #11047: URL: https://github.com/apache/rocketmq/issues/11047#issuecomment-5553416069
**Issue Evaluation** Category: `bug` | Status: **Confirmed** The reported issue has been verified against the current codebase. **Root Cause:** `TimerRequest#isReenqueued` is set to `true` **before** the retry CAS succeeds. When the CAS fails (another thread already committed), the flag remains set. On the next tick, `doPut()` sees `isReenqueued == true` and skips the `rolledBuffer` CAS, so the already-succeeded request is re-processed and the timer message is delivered a second time. **Impact:** Timer message delivery path. Under concurrent flush/retry pressure, scheduled messages are delivered multiple times, violating at-most-once semantics. **Severity:** High — silent data duplication in timer/scheduled message workloads. **Fix Status:** PR #11048 moves the `setReenqueued(true)` call after the CAS succeeds and adds a regression test that reproduces the duplicate delivery. --- *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]
