-
Notifications
You must be signed in to change notification settings - Fork 48
Description
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!