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

fix: remove mention of disabling file locking from config sample #45330

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

icewind1991
Copy link
Member

Disabling transactional locking is almost always a bad idea and can easily lead to data corruption or another range of unexpected behavior.

Removing the mention of this footgun hopefully reduces the number of people disabling the locking without proper understanding.

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label May 15, 2024
@icewind1991 icewind1991 requested review from a team, ArtificialOwl, yemkareems and sorbaugh and removed request for a team May 15, 2024 13:52
@@ -2185,21 +2185,6 @@
*/
'max_filesize_animated_gifs_public_sharing' => 10,


Copy link
Member

Choose a reason for hiding this comment

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

GitHub won't let me make suggestions on deleted lines, but what if instead of removing it we adjusted the language to be a bit more scary like the documentation already is + tried to emphasize it's not the same as files_lock:

/**
 * Transactional file locking
 * Locks files to avoid file corruption during normal operation. 
 * 
 * WARNING: Transactional file locking is not for preventing multiple users from editing 
 * the same document, or giving notice that other users are working on the same document. 
 * Multiple users can open and edit a file at the same time and Transactional File 
 * locking does not prevent this. Rather, it prevents simultaneous file saving. This
 * is enabled by default and should generally be left enabled. 
 * 
 * IMPORTANT: If you are experiencing problems with user facing locking, such 
 * as to avoid simultaneously edits, you may be looking for the `files_lock` app and 
 * its settings and/or settings within the client apps you're using. Do not disable this
 * parameter unless you are extremely sure you know what you're doing.

Copy link
Member Author

Choose a reason for hiding this comment

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

I would rather also remove the mention of the option from the documentation. I can't think of a single case where disabling it would be advisable.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense. 👍

The toggle was only added for turning it on from the looks of it (when it wasn't on by default since it was still experimental at the time): 2f4f468

That need no longer applies today.

Made sense to probably keep it around for a bit when it switched to being on by default in 4880d77, but those days are long over. :-)

@@ -2185,21 +2185,6 @@
*/
'max_filesize_animated_gifs_public_sharing' => 10,


Copy link
Member

Choose a reason for hiding this comment

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

Makes sense. 👍

The toggle was only added for turning it on from the looks of it (when it wasn't on by default since it was still experimental at the time): 2f4f468

That need no longer applies today.

Made sense to probably keep it around for a bit when it switched to being on by default in 4880d77, but those days are long over. :-)

@joshtrichards
Copy link
Member

We can probably pull the unit test override too since it's extraneous:

if ($config->getSystemValueBool('filelocking.enabled', true) or (defined('PHPUNIT_RUN') && PHPUNIT_RUN)) {

joshtrichards added a commit to nextcloud/documentation that referenced this pull request May 21, 2024
No longer relevant today since it's not an experiment feature and is now on by default. There is no good reason to disable it.

See #45330 & nextcloud/server#45330 (comment)

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards
Copy link
Member

I took care of the Transactional File Locking docs chapter: nextcloud/documentation#11848

joshtrichards added a commit to nextcloud/documentation that referenced this pull request May 21, 2024
No longer relevant today since it's not an experiment feature and is now on by default. There is no good reason to disable it.

See #45330 & nextcloud/server#45330 (comment)

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 30 milestone May 23, 2024
backportbot bot pushed a commit to nextcloud/documentation that referenced this pull request May 24, 2024
No longer relevant today since it's not an experiment feature and is now on by default. There is no good reason to disable it.

See #45330 & nextcloud/server#45330 (comment)

Signed-off-by: Josh <josh.t.richards@gmail.com>
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.

None yet

2 participants