Skip to content

Conversation

DimitarTachev
Copy link
Contributor

Replace the lockfile package in order to depend on modified, instead of created date when checking for stale locks.

Replacing the package, we are able to keep smaller stale values (e.g. 10 seconds) and avoid losing the lock during long-running operations. In this way, when the CLI process crashes (or is killed with SIGKILL), we won't have leaked lock files for more than 10 seconds.

PR Checklist

What is the current behavior?

If the process is killed with SIGKILL (kill -9), the lock files will leak for up to 90 seconds.

What is the new behavior?

If the process is killed with SIGKILL (kill -9), the lock files will leak for 5-10 seconds.

@cla-bot cla-bot bot added the cla: yes label Mar 1, 2019
@ghost ghost assigned DimitarTachev Mar 1, 2019
@ghost ghost added the new PR label Mar 1, 2019
…nstead of `created` when checking the `stale` locks

Replacing the lock package, we are able to keep smaller `stale` values (e.g. 10 seconds) and avoid losing the lock during long-running operations. In this way, when the CLI process crashes (or is killed with SIGKILL), we won't have leaked lock files for more than 10 seconds.
@DimitarTachev DimitarTachev merged commit 12c4182 into release Mar 1, 2019
@DimitarTachev DimitarTachev deleted the tachev/fix-locks branch March 1, 2019 13:42
@ghost ghost removed the new PR label Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants