-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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(dav): Mark removal of dav object properties as expensive #50391
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Christoph Wurst <[email protected]>
@tcitworld correct me if my assumption is wrong but we have had this step since #30368 so at late upgrades the repair step will not remove a lot of rows. |
/backport to stable31 |
/backport to stable30 |
/backport to stable29 |
@@ -215,6 +216,7 @@ public static function getExpensiveRepairSteps() { | |||
), | |||
\OC::$server->get(ValidatePhoneNumber::class), | |||
\OC::$server->get(DeleteSchedulingObjects::class), | |||
\OC::$server->get(RemoveObjectProperties::class), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a huge fan of using dav app classes in server but there is no other way right now. #50390 tracks the possibility to declare expensiveness directly in info.xml.
Make sense, though the query still does not seem to use an index. Can we be sure that the delete does not cause locks on the table for too long or may cause other problems? |
Correct, the query does not use an index.
Adding an index would probably also take a couple of hours, and be counterproductive for normal operations outside of the repair step. Let me double check for any queries that could benefit from the query nevertheless. |
The most fitting index would be one on \OCA\DAV\DAV\CustomPropertiesBackend::getUserProperties -> either userid+propertypath OR propertyname+propertypath+userid Other queries that only filter by propertypath and userid would still use |
oc_properties
table has indices foruserid
+propertypath
andpropertypath
. The DELETE query filters onpropertyname
andpropertyvalue
. There are no other queries during normal operation that would benefit from an index, so it's not a valuable alternative.Summary
Moves the repair step from a synchronour repair step to an expensive ones. These are executed via occ.
TODO
Checklist