coder999o opened a new pull request, #6494: URL: https://github.com/apache/rocketmq-dashboard/pull/6494
## What is the purpose of the change A dispatcher can read a delivery with attempt count 3, then claim it after another replica has advanced the count to 4 and the retry is due again. Its failure writes 4 from the stale snapshot instead of ending the fifth attempt as `FAILED/5`. Fixes #6493 ## Brief changelog - Require the selected attempt count to match the stored count when atomically claiming a delivery, including stale-lease recovery. - Skip outdated snapshots so a later dispatch reads current retry state; keep the existing retry budget, backoff and claim-token fences. - Add a database interleaving regression covering stale rejection, fresh-read exhaustion and subsequent polling, plus fresh/expired lease controls. - Update existing mapper call sites and test doubles for the expected-count argument. ## Verifying this change - `mvn -B -ntp -f server/pom.xml -Dspring.profiles.active=dev -Dtest='NotificationOutboxServiceTest,NotificationOutboxMapperIntegrationTest,NotificationWebhookEncodingTest' test` (50 passed; compilation and Checkstyle passed). - `git diff --check` (passed). The stale-snapshot regression failed before the fix and passed afterward. Mapper tests execute the real MyBatis SQL against H2 in MySQL mode, with scheduled dispatch isolated and simulated mail-sender failure. The full backend suite, production MySQL concurrency and live SMTP were not tested. No schema migration is required. -- 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]
