Repository navigation
Only rescan versions once in trashbin - #14640
Conversation
Whenever versions need to be rescanned, only do it once per PHP request. Happens whenever multiple files need to be expired.
|
I suggest to put this "quickfix" in 8.0.2 and also backport to OC 7 to improve deletion/expiration performance and solve issues where people could not delete files due to timeouts like #13176 |
There was a problem hiding this comment.
im almost sure this will break tests one day 🙈
The "disable before operation and manually scan once after it" didnt work?
There was a problem hiding this comment.
The rescan is only triggered whenever versions need to either be expired or restored.
Here: https://github.com/owncloud/core/blob/master/apps/files_trashbin/lib/trashbin.php#L423
Basically whenever no versions folder was detected for that file (happens when expiring a file that has no versions at all) it would trigger that.
This means that rescanning might not always be needed.
There was a problem hiding this comment.
I'll give it a thought.
Maybe I can at least reset the flag back at the end of the restore/expire operation.
There was a problem hiding this comment.
I had a look and I cannot reset the flag directly in those functions.
This is because some operations like "restore()" are called in a loop from outside:
https://github.com/owncloud/core/blob/master/apps/files_trashbin/ajax/undelete.php#L48
I could reset the flag there... but it won't affect unit tests any more.
(static classes FTW...)
|
The inspection completed: 4 new issues |
|
Refer to this link for build results (access rights to CI server needed): |
|
makes sense 👍 Please backport once 8.0.1 is done |
|
👍 looks good |
|
setting milestone 8.1 because merges into master |
Only rescan versions once in trashbin
|
stable8: #14926 |
Whenever versions need to be rescanned, only do it once per PHP request.
Happens whenever multiple files need to be expired.
Should improve #11240
Eventually we should look into removing that scan completely once we understand why there is an potential inconsistency: #11935
@icewind1991 @schiesbn @DeepDiver1975 @nickvergessen @LukasReschke