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

File Locking and (S3) Object Storage or NFS (v3/v4) #19163

Open
solracsf opened this issue Jan 27, 2020 · 8 comments
Open

File Locking and (S3) Object Storage or NFS (v3/v4) #19163

solracsf opened this issue Jan 27, 2020 · 8 comments

Comments

@solracsf
Copy link
Member

solracsf commented Jan 27, 2020

The object storage service’s API should gracefully handle the situation if >1 PHP workers attempt to write to the same file simultaneously. If locking is handled by both Nextcloud (at the application level) and by the storage backend (API level), a conflicting situation can occur where files cannot be updated or deleted due to file locks.

Similar behaviour applies for NFS and file locking.

Shouldn't the Administration > Overview warning and the check be disabled if the primary storage is S3? In other words, shouldn't we recommend to disable filelocking if using S3 or NFS as the storage backend?

@SimplyCorbett
Copy link

Haven't run into this situation but I use ceph.

Deleting files can take a long time but nextcloud will continue to gradually delete them even after closing the page until they are gone.

So I believe even if you run into a file lock issue on the S3 backend nextcloud will still eventually delete them.

As far as editing goes that's a possible issue. I'll have to check into it later today or tomorrow since I don't use nextcloud to edit files.

@solracsf solracsf changed the title NC File Locking and (S3) Object Storage NC File Locking and (S3) Object Storage or NFS (v3/v4) Feb 25, 2020
@solracsf solracsf changed the title NC File Locking and (S3) Object Storage or NFS (v3/v4) File Locking and (S3) Object Storage or NFS (v3/v4) Feb 25, 2020
@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Aug 20, 2020
@sebastiansterk
Copy link
Member

If the warning will stay, then the file locking must be improved. currently you will face issues when using s3 as primary storage with enabled file locking on nextcloud side.

@SimplyCorbett
Copy link

If the warning will stay, then the file locking must be improved. currently you will face issues when using s3 as primary storage with enabled file locking on nextcloud side.

How do you intend to improve nextclouds file locking? Both S3 and NFS have their own built in file locking.

@sebastiansterk
Copy link
Member

If the warning will stay, then the file locking must be improved. currently you will face issues when using s3 as primary storage with enabled file locking on nextcloud side.

How do you intend to improve nextclouds file locking? Both S3 and NFS have their own built in file locking.

This is why the warning should be disabled if the primary storage is s3 ;)

@solracsf
Copy link
Member Author

See also #288 (comment)

@szaimen

This comment has been minimized.

@sebastiansterk

This comment has been minimized.

@szaimen szaimen added 1. to develop Accepted and waiting to be taken care of enhancement and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap needs info labels Jun 17, 2021
@skjnldsv
Copy link
Member

shouldn't we recommend to disable filelocking if using S3 or NFS as the storage backend?

No
The file locking also applies to local files. There might be changes that does not go through the S3 storage.

@solracsf solracsf closed this as completed Oct 3, 2022
@szaimen szaimen reopened this Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants