Skip to content

Feature request: Custom Config - Number of seconds to wait before a record is expired #1158

@ijemmy

Description

@ijemmy

Use case

Description of the feature request

Problem statement
Library users want to specify how long does the idempotency record should last. Once it's expired, the library should behave like there is no such record

Check the design spec for details.

Summary of the feature

  • Add expiresAfterSeconds input
  • Cover edge cases:
    • What if the record expires between PersistenceLayer.saveInProgress() and PersistenceLayer.saveSuccess()?
    • How should PersistenceLayer.saveInProgress() override an expired items?
    • Is there any impact if PersistenceLayer.getRecord() return an expired item? Is there a logic for checking expiration in the library?

Code examples
See the design spec

Story Checklist (for tracking progress)

TBD by an assignee

Definition of done

  • Include unit tests with 100% code coverage (or where it makes sense)

In scope

  • Errors handling
  • Handling scenario of executions in sequence only
  • Unit tests

Out of scope

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

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions