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

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

Merged
merged 1 commit into from
Nov 16, 2020

Conversation

backportbot-nextcloud[bot]
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 <ashod.nakashian@collabora.co.uk>
@faily-bot
Copy link

faily-bot bot commented Nov 12, 2020

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 35448: failure

handlebars

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

3 participants