Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be independent on system time #1

Open
ct-clearhaus opened this issue Dec 9, 2014 · 0 comments
Open

Be independent on system time #1

ct-clearhaus opened this issue Dec 9, 2014 · 0 comments
Labels

Comments

@ct-clearhaus
Copy link
Member

Time may differ on instances running, so the lock acquiring timeout may be different than what's configured if two systems sharing the lock has time drifting away from each other.

What about writing something "random" (collision resistant; just incremental?) rather than :created time (https://github.com/clearhaus/dynamodb-mutex/blob/master/lib/dynamodb_mutex/lock.rb#L36) and then each instance checks if it has seen the given "random" for :ttl time?

Then :ttl becomes kinda ":min_ttl", or the TTL that will always be experienced. Needs to be documented. It's also easy to document that you need time on instances to be right, but the bugs you may experience with time drifting is probable less fun than the configuration trouble you have when setting the TTL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant