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

Merged
merged 1 commit into from
Nov 15, 2024

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.

@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 <[email protected]>
@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 <[email protected]>
@joshtrichards joshtrichards requested a review from Altahrim May 22, 2024 21:10
@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 <[email protected]>
This was referenced Jul 30, 2024
@Altahrim Altahrim mentioned this pull request Aug 5, 2024
@skjnldsv skjnldsv added 2. developing Work in progress stale Ticket or PR with no recent activity and removed 3. to review Waiting for reviews labels Aug 6, 2024
@Altahrim Altahrim mentioned this pull request Aug 7, 2024
@skjnldsv skjnldsv mentioned this pull request Aug 13, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 30, Nextcloud 31 Aug 14, 2024
@icewind1991 icewind1991 force-pushed the remove-locking-config-sample branch from 8e6ba4f to 6791ecb Compare September 19, 2024 19:28
@skjnldsv skjnldsv merged commit c0c6581 into master Nov 15, 2024
175 checks passed
@skjnldsv skjnldsv deleted the remove-locking-config-sample branch November 15, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress feature: filesystem stale Ticket or PR with no recent activity technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants