Closed
Description
MessageDigest
is not thread safe, therefore if there are multiple requests in quick succession, different hash is returned for the same input.
Consequently, idempotent contract is broken and requests are treated as new for the same IdempotentKey
Expected Behavior
For the same IdempotentKey, same hash must be generated.
When generating Hash value, a new instance of MessageDigest
should be used.
I am creating a PR to fix this issue.
this here explain thread safety issue of MessageDigest