Uh oh!
There was an error while loading. Please reload this page.
Use index to mark parent as outdated, fixes: #14537 - #14571
Conversation
d471d2d to
0f41197Compare0f41197 to
2ab0bb7Compareicewind1991
commented
Mar 7, 2019
You're missing the comparison on Also it would be nice to move this over the using the query builder |
ariselseng
commented
Mar 7, 2019
Wow that went a little to fast 😄 |
2ab0bb7 to
ef5ebd6Compareariselseng
commented
Mar 7, 2019
@icewind1991 Doesn't look like querybuilder works with UPDATE and INNER JOIN: https://stackoverflow.com/questions/15293502/doctrine-query-builder-not-working-with-update-and-inner-join |
ariselseng
commented
Mar 7, 2019
@icewind1991 Actually, UPDATE with JOINS is not supported in sqlite. Cleanest way would probably be to do it in two queries then. What do you think? |
ef5ebd6 to
ab8b977Compareariselseng
commented
Mar 8, 2019
@icewind1991 Alright, now it uses two queries. I moved the reconnect logic to the storageIds query instead. I don't think we need both. I also couldn't figure out how reuse them as prepared statements. Is this okay? |
Uh oh!
There was an error while loading. Please reload this page.
ab8b977 to
835d023Compareariselseng
commented
Mar 8, 2019
@kesselb@icewind1991 How does it look now? One thing in my case where a subfolder is not accessible/listable and hidden on the share for the SMB user. The notify changes are still listed by the SMB server even though the user listening do not have access (I think only NTFS permissions is set). Each time that subfolder is changed, this code will log about missing parent. Probably only a problem for a very few. |
Uh oh!
There was an error while loading. Please reload this page.
835d023 to
b7e2594CompareUh oh!
There was an error while loading. Please reload this page.
icewind1991
commented
Mar 8, 2019
looks good otherwise |
37bbb34 to
c0dc0eeComparec0dc0ee to
4aa30cdCompareariselseng
commented
Mar 15, 2019
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| $storageIds = $this->getStorageIds($mountId); | ||
| } | ||
| if (!$storageIds || count($storageIds) === 0) { |
There was a problem hiding this comment.
I would expect that getStorageIds always returns an array $storageIds === [] should work.
| $storageIds = $this->getStorageIds($mountId); | ||
| } catch (DriverException $ex) { | ||
| $this->logger->logException($ex, ['app' => 'files_external', 'message' => 'Error while trying to mark folder as outdated', 'level' => ILogger::WARN]); | ||
| $this->logger->logException($ex, ['app' => 'files_external', 'message' => 'Error while trying to find correct storage ids.', 'level' => ILogger::WARN]); |
There was a problem hiding this comment.
The logger should set the right app here. Could you test it without 'app' => 'files_external'?
4aa30cd to
575de52Compareariselseng
commented
Mar 15, 2019
@kesselb Thank you for you input. I have pushed changes now. Care to have a look again? |
Signed-off-by: Ari Selseng <ari@selseng.net>
575de52 to
11b3fbfComparekesselb
commented
Mar 18, 2019
Don't have a working test setup for smb 😞 Code looks good 👍 |
ariselseng
commented
Mar 18, 2019
@MorrisJobke@rullzer is this mergeable? |
Make inner join to make at least mariadb to use index in update query in Notify.php
Fixes#14537