Skip to content

Conversation

@icewind1991
Copy link
Member

Extra locking there isn't needed to ensure a consistent state

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label May 4, 2018
@icewind1991 icewind1991 added this to the Nextcloud 14 milestone May 4, 2018
@icewind1991 icewind1991 requested review from MorrisJobke and rullzer May 4, 2018 10:53
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot better for an upload of a single file.

Before:

acquire shared lock on "files/github.png" on storage "home::admin"
release shared lock on "files/github.png" on storage "home::admin"
acquire shared lock on "files/github.png" on storage "home::admin"
release shared lock on "files/github.png" on storage "home::admin"
acquire shared lock on "files/github.png" on storage "home::admin"
release shared lock on "files/github.png" on storage "home::admin"
acquire shared lock on "files/github.png" on storage "home::admin"
acquire exclusive lock on "files/admin/files/github.png.upload.part" on storage "home::admin"
acquire shared lock on "files/admin" on storage "home::admin"
acquire shared lock on "files/admin/files" on storage "home::admin"
acquire shared lock on "files/github.png" on storage "home::admin"
release shared lock on "files/github.png" on storage "home::admin"
acquire shared lock on "files/github.png" on storage "home::admin"
release shared lock on "files/github.png" on storage "home::admin"
change lock on "files/github.png" to exclusive on storage "home::admin"
change lock on "files/github.png" to shared on storage "home::admin"
release exclusive lock on "files/admin/files/github.png.upload.part" on storage "home::admin"
release shared lock on "files/admin" on storage "home::admin"
release shared lock on "files/admin/files" on storage "home::admin"
release shared lock on "files/github.png" on storage "home::admin"
release shared lock on "files/github.png" on storage "home::admin"

After:

acquire shared lock on "files/github.png" on storage "home::admin"
change lock on "files/github.png" to exclusive on storage "home::admin"
change lock on "files/github.png" to shared on storage "home::admin"
release shared lock on "files/github.png" on storage "home::admin"

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@MorrisJobke MorrisJobke merged commit fb29634 into master May 4, 2018
@MorrisJobke MorrisJobke deleted the getcachentry-lock branch May 4, 2018 12:57
@MorrisJobke
Copy link
Member

@icewind1991 Could you please open a backport for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants