Skip to content
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

Reducing queries in ScanFiles.php #40019

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

FedericoHeichou
Copy link
Contributor

Summary

By changing the approach to the problem, it will guarantee that all users are scanned and it will only perform 2 (or 3) fast queries without performing joins.

TODO

  • ...

Checklist

@szaimen szaimen added this to the Nextcloud 28 milestone Aug 23, 2023
@szaimen szaimen requested review from icewind1991, CarlSchwan, a team, ArtificialOwl and nfebe and removed request for a team August 23, 2023 14:31
apps/files/lib/BackgroundJob/ScanFiles.php Fixed Show fixed Hide fixed
}

if ($lastUser === $user) {
$this->logger->warning("User $user still has unscanned files after running background scan, background scan might be stopped prematurely");
if ($this->config->getSystemValue('loglevel') > ILogger::WARN) {

Check notice

Code scanning / Psalm

DeprecatedClass

Class OCP\ILogger is deprecated
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking the code there are not good alternatives.
There is a Psr\Log\LogLevel but it is a string, not a int.

@FedericoHeichou
Copy link
Contributor Author

Do you think the Samba's failure is my fault? I think it just not sleeped enough or something like that. https://drone.nextcloud.com/nextcloud/server/39214/7/3

A question, I see it usually fails the "Cypress" test in every PR. I'm doing something wrong?

@skjnldsv skjnldsv mentioned this pull request Nov 1, 2023
This was referenced Nov 6, 2023
This was referenced Nov 14, 2023
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
Signed-off-by: FedericoHeichou <federicoheichou@gmail.com>
Signed-off-by: FedericoHeichou <federicoheichou@gmail.com>
Signed-off-by: FedericoHeichou <federicoheichou@gmail.com>
This was referenced Mar 20, 2024
@skjnldsv skjnldsv mentioned this pull request Mar 28, 2024
81 tasks
@skjnldsv skjnldsv modified the milestones: Nextcloud 29, Nextcloud 30 Mar 28, 2024
@skjnldsv skjnldsv added 2. developing Work in progress stale Ticket or PR with no recent activity and removed 3. to review Waiting for reviews labels Jul 27, 2024
This was referenced Jul 30, 2024
This was referenced Aug 5, 2024
@skjnldsv skjnldsv mentioned this pull request Aug 13, 2024
@skjnldsv skjnldsv removed this from the Nextcloud 30 milestone Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: ScanFiles never performed and slow with big tables
6 participants