nextcloud / nextcloud/server

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

Open
#19,163 8 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement feature: locking feature: object storage technical debt
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Administration > Overview file-locking warning and check, then inspect how primary S3 and NFS storage are identified. Compare the application-level filelocking setting with the storage backends' locking behavior. Done means the supported behavior and warning state are defined consistently for S3 and NFS without causing conflicting locks.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.