Skip to content

[stable18] Unlock when promoting to exclusive lock fails - #24077

Merged
juliusknorr merged 1 commit into
stable18from
backport/23741/stable18
Nov 16, 2020
Merged

[stable18] Unlock when promoting to exclusive lock fails#24077
juliusknorr merged 1 commit into
stable18from
backport/23741/stable18

Conversation

@backportbot-nextcloud

Copy link
Copy Markdown

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 <ashod.nakashian@collabora.co.uk>
@faily-bot

faily-botBot commented Nov 12, 2020

Copy link
Copy Markdown

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 35448: failure

handlebars

@rullzerrullzer mentioned this pull request Nov 13, 2020
1 task
@nickvergessen
nickvergessen requested review from icewind1991 and removed request for nickvergessenNovember 16, 2020 14:57
@juliusknorr
juliusknorr merged commit 396a50f into stable18Nov 16, 2020
@juliusknorr
juliusknorr deleted the backport/23741/stable18 branch November 16, 2020 16:06
Sign up for freeto 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.

3 participants

@rullzer@juliusknorr@Ashod