-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Enable removal of UNIX lock files #408
base: main
Are you sure you want to change the base?
Conversation
This avoids leaving orphan locks files around after we are done when them. See emscripten-core/emscripten#24035 Fixes: tox-dev#31
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.
Please add tests 👍
I can add a test that confirm the that lock file is deleted. Added a test the races mentioned do not pose a problem is harder. Even if we added some intense stress tests that right conditions for the race might not happen. Hopefully the former is enough? |
See tox-dev/filelock#31 and https://stackoverflow.com/a/51070775. Without this change the `cache/symbol_lists` directory ends up full of many lock files that might never get cleaned up (At least since #24029 landed). I'm also sending this change upstream: tox-dev/filelock#408
open_flags = os.O_RDWR | os.O_TRUNC | ||
if not Path(self.lock_file).exists(): | ||
open_flags |= os.O_CREAT | ||
open_flags = os.O_RDWR | os.O_TRUNC | os.O_CREAT |
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.
I worry a little that I had to remove this workaround which was added in: #317.
I can't seem to find a way to keep both of these fixes in place.
This avoids leaving orphan locks files around after we are done when them.
See emscripten-core/emscripten#24035
Fixes: #31