fix(dav): release part-file lock when an upload fails#61863
Merged
Conversation
come-nc
reviewed
Jul 7, 2026
come-nc
left a comment
Contributor
There was a problem hiding this comment.
Looks good. Is that still a draft?
solracsf
force-pushed
the
fix/release-lock-failed-upload
branch
from
July 7, 2026 09:49
91dfc0d to
88e6e4d
Compare
solracsf
marked this pull request as ready for review
July 7, 2026 09:49
solracsf
requested review from
ArtificialOwl,
leftybournes and
salmart-dev
and removed request for
a team
July 7, 2026 09:49
Member
Author
|
/backport to stable34 |
Member
Author
|
/backport to stable33 |
Member
Author
|
/backport to stable32 |
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
solracsf
force-pushed
the
fix/release-lock-failed-upload
branch
from
July 7, 2026 14:46
88e6e4d to
e463fc9
Compare
come-nc
reviewed
Jul 7, 2026
come-nc
approved these changes
Jul 13, 2026
CarlSchwan
approved these changes
Jul 16, 2026
This was referenced Jul 16, 2026
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Directory::createFile()takes a shared lock on the target file and an exclusive lock on the<name>.upload.partpath before callingFile::put(), but only released them on the success path. If the upload throws or is interrupted, both locks are left behind.A leftover exclusive part-file lock causes every later upload to the same path to fail with
423 Locked. Because it persists until the request-scoped cleanup runs, or up to the lock TTL (default 1h) if the PHP worker is killed mid-request, one failed upload can block that file for a long time. The web uploader retries423, so it just keeps hitting the same lock.This wraps
put()intry/finallyso the locks are always released.Checklist
3. to review, feature component)stable32)AI (if applicable)