-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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): add missing database index for dav_shares #46036
Conversation
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.
Looks good otherwise.
Otherwise ... what? |
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.
+1
49d6e5d
to
73a059f
Compare
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.
Looks good! Please squash into on single commit
@@ -235,6 +239,7 @@ public function registerHooks(HookManager $hm, | |||
|
|||
// Here we should recalculate if reminders should be sent to new or old sharees | |||
}); | |||
|
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.
🔥
/backport to stable29 |
@@ -471,6 +471,9 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op | |||
]); | |||
$table->setPrimaryKey(['id']); | |||
$table->addUniqueIndex(['principaluri', 'resourceid', 'type', 'publicuri'], 'dav_shares_index'); | |||
// modified on 2024-6-21 to add performance improving indices on new instances | |||
$table->addIndex(['resourceid', 'type'], 'dav_shares_resourceid_type'); |
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 don't know if principaluri
is used for searches, but if not, it could make sense to change the unique index instead of adding this new one:
$table->addUniqueIndex(['resourceid', 'type', 'principaluri', 'publicuri'], 'dav_shares_index');
2cdac28
to
7f37143
Compare
…and access Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com> Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud> Signed-off-by: Sebastian Krupinski <165827823+SebastianKrupinski@users.noreply.github.com> Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com> Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud> Signed-off-by: Sebastian Krupinski <165827823+SebastianKrupinski@users.noreply.github.com> Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud> Signed-off-by: Sebastian Krupinski <165827823+SebastianKrupinski@users.noreply.github.com> Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud> Signed-off-by: Sebastian Krupinski <165827823+SebastianKrupinski@users.noreply.github.com> Co-authored-by: Daniel <mail@danielkesselberg.de> Signed-off-by: Sebastian Krupinski <165827823+SebastianKrupinski@users.noreply.github.com> Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
7f37143
to
ff7e2c1
Compare
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
Added missing database indexes for dav_shares table, (resourceid, type) and (recourseid, access)