Skip to content

Feature request: Return the same result when called with the same payload (FR3) #1157

@ijemmy

Description

@ijemmy

Use case

Description of the feature request

Problem statement
If the request has already been received before, return the saved result from previous execution.

Check the design spec for details.

Summary of the feature

  • Save the result in the persistence layer when it completes.
  • If the Lambda handler receive the request with same payload, it should return a cached result from persistence result
    • In the case that there is an existing record but there is no result (the status is still IN_PROGRESS), throw IdempotencyItemAlreadyExists
  • Edge case(s)
    • The record may be expired. Check with Python version on how they handle this case. We should aim for the same behavior.

Code examples
See the design spec

Story Checklist (for tracking progress)

TBD

Definition of done

  • Include unit tests with 100% code coverage
  • Code documentation (TS doc) on classes and public methods

Related issues, RFCs

#447

Solution/User Experience

See #447

Alternative solutions

N/A

Acknowledgment

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityidempotencyThis item relates to the Idempotency Utility

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions