Skip to content

Inability to Acquire an Expired Lock without Busy Waiting LeaseDuration #778

@qvissak

Description

@qvissak

For context, I used to be an L6 SDE @ AWS EC2, and internally fixed the issue described here in 2023: https://github.com/awslabs/amazon-dynamodb-lock-client/pull/88/files, which persisted to this repo when it was ported. Seems like alternative solutions have since been adopted (see https://github.com/awslabs/amazon-dynamodb-lock-client/pull/99/files) but this is an inferior approach, since it still requires failing to acquire the lock on the first attempt.

The issue is - if a node holding the lock non-gracefully terminates, and the lock is not released, there is no way to quickly acquire the lock.

Proposed solution - identical to awslabs/amazon-dynamodb-lock-client#88, where we introduce a clock skew parameter and add an attribute to ddb records for the last time in which the record was touched. I'm more than happy to contribute to this repo if you're accepting pull requests, otherwise I will fork it for my own needs. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions