Skip to content

Conversation

@backportbot-nextcloud
Copy link

backport of #23741

In certain cases changeLock to EXCLUSIVE fails
and throws LockedException. This leaves the
file locked as SHARED in file_put_contents,
which prevents retrying (because on second
call file_put_contents takes another SHARED
lock on the same file, and changeLock doesn't
allow more than a single SHARED lock to promote
to EXCLUSIVE).

To avoid this case, we catch the LockedException
and unlock before re-throwing.

Signed-off-by: Ashod Nakashian <[email protected]>
@rullzer rullzer added the 3. to review Waiting for reviews label Nov 9, 2020
@rullzer rullzer mentioned this pull request Nov 10, 2020
@MorrisJobke MorrisJobke merged commit bf6aa03 into stable20 Nov 10, 2020
@MorrisJobke MorrisJobke deleted the backport/23741/stable20 branch November 10, 2020 09:16
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.

4 participants