v0.1.25.11 concurrent idempotency + counter-accuracy tests
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.reservecounter 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