One servlet filter, two interchangeable stores, 18 tests (9 scenarios x 2 stores) against a real redis-server 7.0.15 and PostgreSQL 16.15, and 20 captured transcripts under output/: replay, 422 on a changed body, concurrent duplicates, expiry, the crash window and a handler slower than the lock. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b5yg8grY17JsVAJviV
7 lines
543 B
Plaintext
7 lines
543 B
Plaintext
store: postgres, in-progress ttl: 2 s, handler takes 3.2 s
|
|
request A (t=0 s) -> HTTP 201 replayed=- retry-after=- {"id":1,"customer":"cus_42","amount":1999,"currency":"INR"}
|
|
request B (t=2.5 s, same key) -> HTTP 201 replayed=true retry-after=- {"id":1,"customer":"cus_42","amount":1999,"currency":"INR"}
|
|
payments in the table: 1
|
|
requests that finished after their lock expired: n/a (a row lock under an open transaction cannot expire)
|
|
what the store holds afterwards: row status COMPLETED, response_status 201
|