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

[5.7] Fix filesystem locking hangs in PackageManifest::build() (#25898) #26254

Merged
merged 3 commits into from
Oct 29, 2018
Merged

[5.7] Fix filesystem locking hangs in PackageManifest::build() (#25898) #26254

merged 3 commits into from
Oct 29, 2018

Conversation

Yogarine
Copy link
Contributor

So, for what it's worth, here is my updated fix for #25898, the NFS file locking issue.

I cleaned it up some more and included a fix that prevents #26232. I also included that case in the unit test, among with some other cases.

  • Filesystem.php

    1. Created a new Filesystem::replace() method that atomically replaces a file if it already exists.
  • PackageManifest.php

    1. The Filesystem::get() call in PackageManifest::getManifest() no longer has to use an exclusive lock because the packages.php manifest file will always be replaced atomically.

    2. Use the new Filesystem::replace() method in PackageManifest::write()

  - Filesystem.php

     1. Created a new `Filesystem::replace()` method that atomically
        replaces a file if it already exists.

  - PackageManifest.php

     1. The Filesystem::get() call in PackageManifest::getManifest() no
        longer has to use an exclusive lock because the packages.php
        manifest file will always be replaced atomically.

     2. Use the new Filesystem::replace() method in
        PackageManifest::write()
@taylorotwell taylorotwell merged commit 8bb1ff9 into laravel:5.7 Oct 29, 2018
@Yogarine Yogarine deleted the 25898-fix-filesystem-locking-hangs branch November 2, 2018 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants