Uh oh!
There was an error while loading. Please reload this page.
Restrict query when searching for versions of trashbin files - #23097
Conversation
rullzer
commented
Sep 29, 2020
nice one. but I'd really love the input from our storage overloard @icewind1991 |
juliusknorr
commented
Sep 30, 2020
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 |
rullzer
commented
Oct 3, 2020
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 |
Uh oh!
There was an error while loading. Please reload this page.
b2b655f to
62403c7Comparejuliusknorr
commented
Oct 7, 2020
Let's see if psalm is happy with that |
MorrisJobke
commented
Oct 7, 2020
Looks good 👍 Even one error is "fixed". 😆 |
87a0e0c to
7e6f0dfCompareUh oh!
There was an error while loading. Please reload this page.
7e6f0df to
2243f58CompareSigned-off-by: Julius Härtl <jus@bitgrid.net>
2243f58 to
2616a78Compare🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 34140: failuremariadb10.1-php7.3
mysql8.0-php7.4
|
MorrisJobke
commented
Oct 14, 2020
@juliushaertl Backport or not? |
MorrisJobke
commented
Nov 3, 2020
ping @juliushaertl |
juliusknorr
commented
Nov 4, 2020
/backport to stable20 |
juliusknorr
commented
Nov 4, 2020
/backport to stable19 |
juliusknorr
commented
Nov 4, 2020
/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.