-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Implement Pid file locking #5676
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark for 02156faClick to view benchmark
|
crodas
force-pushed
the
lsp-lock-stale-recovery
branch
from
February 28, 2024 23:35
9ef6186
to
3c27176
Compare
Benchmark for 25d18f8Click to view benchmark
|
sdankel
reviewed
Feb 29, 2024
sdankel
reviewed
Feb 29, 2024
sdankel
reviewed
Feb 29, 2024
sdankel
reviewed
Feb 29, 2024
crodas
force-pushed
the
lsp-lock-stale-recovery
branch
from
February 29, 2024 02:30
00cdbcb
to
d80894a
Compare
Benchmark for f1b1c65Click to view benchmark
|
Screen.Recording.2024-02-29.at.19.50.39.mov |
sdankel
reviewed
Feb 29, 2024
crodas
force-pushed
the
lsp-lock-stale-recovery
branch
2 times, most recently
from
February 29, 2024 23:33
1a40603
to
3f0b0da
Compare
Benchmark for 052fb92Click to view benchmark
|
JoshuaBatty
requested changes
Mar 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Off to a good start, but it would be good to address my concern about the sysinfo crate before this lands.
crodas
force-pushed
the
lsp-lock-stale-recovery
branch
from
March 1, 2024 15:32
84d06a1
to
5933bd5
Compare
Benchmark for a5ef4d2Click to view benchmark
|
Benchmark for 68cbbecClick to view benchmark
|
sdankel
reviewed
Mar 5, 2024
Fixes #5633 Added functionality to create and manage a lock file containing the process ID (pid) of the running instance of the software. This mechanism prevents multiple instances of the software from running simultaneously by checking the existence and content of the lock file. If the lock file exists and contains a valid pid, the struct will error gracefully to avoid conflicts. If the lock file is missing or contains an invalid pid, the struct will proceed by removing the file. This ensures that only one instance of the software can run at a time and it avoids stale locking to prevent future instances
Co-authored-by: Sophie Dankel <[email protected]>
Co-authored-by: Sophie Dankel <[email protected]>
Add tests for releasing lock
crodas
force-pushed
the
lsp-lock-stale-recovery
branch
from
March 5, 2024 19:28
62a24d4
to
bd56e81
Compare
Benchmark for 2fe0c97Click to view benchmark
|
JoshuaBatty
approved these changes
Mar 5, 2024
Benchmark for 3f190bfClick to view benchmark
|
Benchmark for b777769Click to view benchmark
|
sdankel
approved these changes
Mar 6, 2024
Benchmark for 047bb2aClick to view benchmark
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #5633
Added functionality to create and manage a lock file containing the process ID (pid) of the running instance of the software. This mechanism prevents multiple instances of the software from running simultaneously by checking the existence and content of the lock file. If the lock file exists and contains a valid pid, the struct will error gracefully to avoid conflicts. If the lock file is missing or contains an invalid pid, the struct will proceed by removing the file. This ensures that only one instance of the software can run at a time and it avoids stale locking to prevent future instances
Checklist
Breaking*
orNew Feature
labels where relevant.