unbridled-41 commented on PR #11048:
URL: https://github.com/apache/rocketmq/pull/11048#issuecomment-5556024214

   **Evidence-chain audit (2026-09-06)** — every technical assertion in the PR 
body re-verified against source; tests re-run at the branch tip.
   
   Code-level anchors (personally re-read at the fix branch):
   
   - Trigger plausibility verified: `TimerLog#append` 
(`store/.../timer/TimerLog.java:64-72`) calls `getLastMappedFile(0)` when the 
current file is full and returns **-1** when a new mapped file cannot be 
allocated ("Create mapped file1 error for timer log") — `doEnqueue` then 
returns false, which is exactly the partial-batch failure that drives the retry 
round.
   - Duplication consequence verified: `TimerMessageStore#dequeue` (`:1018+`) 
walks the slot chain **unit by unit** ("read the timer log one by one"); every 
non-`MAGIC_DELETE` unit becomes an independent `TimerRequest` that is converted 
and put to the real topic, so a re-appended unit delivers the same message 
again.
   - Flow-control skew verified: `isReject` 
(`TimerMessageStore.java:1895-1905`) reads `timerWheel.getNum(deliverTimeMs)` 
(the slot `num`), and `getDequeueBehindMessages`/`getAllNum` (`:1888`, `:1928`) 
accumulate the same counter — inflated `num` from duplicated units distorts 
these decisions.
   - Safety of the fix verified in source: requests routed to `dequeuePutQueue` 
are released in the `finally` via `tr.idempotentRelease(!tmpDequeueChangeFlag)` 
(`:1688`), where `tmpDequeueChangeFlag` is set **only** on service stop 
(`:1630`); in the normal path they are released with `succ = true` before the 
shared latch completes, so the retry filter never re-puts them. On stop, the 
retry loop exits via `isStopped()` as well, so no path re-puts a released 
request.
   
   Fresh re-run at this PR's tip `dd3fc6777` (2026-09-06, JDK 21):
   
   ```
   mvn -pl store test -Dtest=TimerMessageStoreTest
   Tests run: 12, Failures: 0, Errors: 0, Skipped: 0 — BUILD SUCCESS
   ```
   
   Pre-fix failure remains as anchored in the PR body: `expected:<1> but 
was:<2>` at `TimerMessageStoreTest.java:703` on `develop @ ff8f6f74c` + test 
only (2026-09-05).
   


-- 
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