Skip to content

v0.1.25.11 concurrent idempotency + counter-accuracy tests

Choose a tag to compare

@amavashev amavashev released this 14 Apr 20:12
· 353 commits to main since this release
ba820b7

What's Changed

  • test(v0.1.25.11): concurrent idempotency + counter-accuracy tests by @amavashev in #99

Closes two gaps flagged in the v0.1.25.10 review:

  • Thundering-herd retry on expired idempotency cache — fires 10 concurrent retries with the same idempotency key after cache expiry, asserts exactly one reservation is created and metric tags split correctly (1 × reason=OK + 9 × reason=IDEMPOTENT_REPLAY).
  • Concurrent custom-counter accuracy — asserts cycles.reservations.reserve counter is accurate under 8-thread × 10-request load with zero lost increments.

Both are regression gates rather than live bug fixes — correctness holds today because Redis Lua execution is single-threaded and Micrometer counters use lock-free AtomicLong internally. Without these tests, a future refactor (idempotency logic moving out of Lua into Java; tag-building aspect with shared state) could silently violate those guarantees.

Wire format unchanged vs v0.1.25.10 — no client changes required.

Full Changelog: v0.1.25.10...v0.1.25.11