-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Restrict query when searching for versions of trashbin files #23097
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
Conversation
ChristophWurst
left a comment
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.
👍 🐘
|
nice one. but I'd really love the input from our storage overloard @icewind1991 |
|
Yes, I'd highly appreciate a closer look from @icewind1991 as well. Some more comments on my validation paths since I also don't know that code very well. I've tested this to still work when:
View::searchCommon also includes mountpoints in the search, so this is no longer the case however I assumed there should never be any mountpoints inside of the /[uid]/files_trashbin/versions fake root. server/lib/private/Files/View.php Lines 1653 to 1671 in cfde744
|
|
mmmm so for some reason the static analysis complains. Lets summon the wizards: @MorrisJobke @kesselb |
|
Oh. I'm not sure what Psalm is complaining about 🙈
Mind to try the above version? I'm not sure if Psalm is reading the inline |
b2b655f to
62403c7
Compare
|
Let's see if psalm is happy with that |
Looks good 👍 Even one error is "fixed". 😆 |
MorrisJobke
left a comment
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.
Code itself makes sense 👍
87a0e0c to
7e6f0df
Compare
7e6f0df to
2243f58
Compare
Signed-off-by: Julius Härtl <[email protected]>
2243f58 to
2616a78
Compare
|
🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 34140: failuremariadb10.1-php7.3
mysql8.0-php7.4
|
|
@juliushaertl Backport or not? |
|
ping @juliushaertl |
|
/backport to stable20 |
|
/backport to stable19 |
|
/backport to stable18 |

The current way of obtaining the versions from files in the trashbin is quite slow since it does a like operation on the unindexed name column. Since we know the full path of the file in the trashbin we can limit the search to the parent id. This should drastically speed up query times on large file cache tables.
We can ignore other things than single file restores since all usages have a separate code path for that.