Idempotency in progress timeout #1281
Labels
bug
Something isn't working
priority:1
Critical - need urgent attention, must be fixed and resolved ASAP
triage
Two expirations are stored on the DDB table:
When a request comes in, we try and conditionally upsert the DDB record - if the
in_progress_expiration
time is beforenow()
, we can overwrite it, else we can't. The bug is here:powertools-lambda-java/powertools-idempotency/src/main/java/software/amazon/lambda/powertools/idempotency/persistence/DynamoDBPersistenceStore.java
Line 154 in a19def3
powertools-lambda-java/powertools-idempotency/src/main/java/software/amazon/lambda/powertools/idempotency/persistence/DynamoDBPersistenceStore.java
Line 163 in a19def3
We set
now
once, but we use it in a comparison where the units should be seconds, and another where the units should be milliseconds.The upshot of this is that if a handler times out within an idempotent operation, we'll start seeing exceptions thrown for subsequent invocations.
What were you trying to accomplish?
Expected Behavior
Subsequent executions after a function timeout should update the DDB table and complete.
Current Behavior
Possible Solution
nowMs
andnow
in the DDB conditional updateThe text was updated successfully, but these errors were encountered: