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 mkdir() race condition #745

Closed
wants to merge 9 commits into from
Closed

Conversation

andrey-tech
Copy link
Contributor

Description

mkdir() race condition in cache warmers.

Q A
Branch? 4.5.x
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix Issue #744
License MIT
Doc PR -

The race condition is appears when several processes are attempting to create a same Doctrine Proxy/Hydrator directory which does not yet exist and \RuntimeException is thrown.

This PR adds an extra check !is_dir().

@malarzm malarzm added the bug label Sep 18, 2022
@malarzm malarzm added this to the 4.5.1 milestone Sep 18, 2022
@malarzm
Copy link
Member

malarzm commented Sep 18, 2022

@andrey-tech thanks for the PR! Would you mind rebasing your branch? I've merged #746 to fix CI issues.

@malarzm
Copy link
Member

malarzm commented Sep 18, 2022

@andrey-tech mind running vendor/bin/phpcbf to fix coding standards job? Also it looks like you've merged the changes instead of rebasing them - please note the merge commit. Would it be possible to rebase instead? If not, I can do that manually while merging.

@malarzm
Copy link
Member

malarzm commented Sep 19, 2022

Gonna merge this in #747 with your commit preserved. Thanks @andrey-tech!

@malarzm malarzm closed this Sep 19, 2022
@malarzm malarzm removed this from the 4.5.1 milestone Sep 19, 2022
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