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

Make mypy cache move truly atomic (Cherry-pick of #19610) #19615

Merged
merged 1 commit into from Aug 22, 2023

Conversation

WorkerPants
Copy link
Member

This change makes the post-mypy-run "moving" of the mypy cache database truly atomic (as claimed in the comment).

It does so by checking the device IDs of the source and dest. If they match, mv is atomic. Otherwise, cp the src into a tmpfile next to the dest, then mv into place.

Fixes #19609

This change makes the post-mypy-run "moving" of the mypy cache database
truly atomic (as claimed in the comment).

It does so by checking the device IDs of the source and dest. If they
match, `mv` is atomic. Otherwise, `cp` the src into a tmpfile next to
the dest, then `mv` into place.

Fixes #19609
@WorkerPants WorkerPants added this to the 2.17.x milestone Aug 16, 2023
@WorkerPants WorkerPants added the category:bugfix Bug fixes for released features label Aug 16, 2023
@thejcannon thejcannon merged commit abf8ef3 into 2.17.x Aug 22, 2023
24 checks passed
@thejcannon thejcannon deleted the cherry-pick-19610-to-2.17.x branch August 22, 2023 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants