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

Fix cache race condition due to missing repopulation of lock files cache #8714

Merged

Conversation

kkmuffme
Copy link
Contributor

No description provided.

@kkmuffme kkmuffme marked this pull request as ready for review November 17, 2022 08:43
@kkmuffme
Copy link
Contributor Author

@orklah review + merge please, this fixes a major race condition in cache

@weirdan
Copy link
Collaborator

weirdan commented Nov 17, 2022

@kkmuffme can you explain what the race condition specifically was?

@kkmuffme
Copy link
Contributor Author

Psalm updated the config hash file in cache, even when nothing changed. This modified the mtime of it, therefore triggering external tools to assume the config changed when only the file mtime was checked

This would then cause issues if you would run a mix of psalm and psalter on the same cache directory at the same time, causing the cache to be cleared all the time and errors being thrown (race condition)

@orklah
Copy link
Collaborator

orklah commented Nov 18, 2022

Thanks!

@orklah orklah added the release:internal The PR will be included in 'Internal changes' section of the release notes label Nov 18, 2022
@orklah orklah merged commit 4e17585 into vimeo:master Nov 18, 2022
@kkmuffme kkmuffme deleted the dont-rewrite-config-hash-to-cache-when-unchanged branch November 20, 2022 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:internal The PR will be included in 'Internal changes' section of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants