Skip to content

fix(files): release locks after failed stream uploads#62427

Draft
joshtrichards wants to merge 2 commits into
masterfrom
jtr/fix-View-lock-release-putFileContent
Draft

fix(files): release locks after failed stream uploads#62427
joshtrichards wants to merge 2 commits into
masterfrom
jtr/fix-View-lock-release-putFileContent

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Jul 22, 2026

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Stream-based View::file_put_contents() uploads can retain an exclusive lock if the storage backend throws after lock escalation.

This PR ensures cleanup releases the currently held lock on all failure path and adds regression coverage for a destination-storage fopen() exception. Also includes minor refactoring of the function to flatten it by using early guards to improve readability.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI [tests in particular]

Signed-off-by: Josh <josh.t.richards@gmail.com>
Assisted-by: Copilot:GPT-5.6

Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants