-
Notifications
You must be signed in to change notification settings - Fork 64
move counting storage statistics to the background #297
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
|
/backport to stable21 |
|
/backport to stable20 |
| $storageCount++; | ||
| $fileQuery->setParameter('storageId', $storageRow['id']); | ||
| $fileResult = $fileQuery->execute(); | ||
| $fileCount += (int)$fileResult->fetchOne(); |
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.
fetchOne is not available for 20 :(
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.
so adjust on the backport to fetchColumn()
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.
Yup, this here goes against 22. Backports get their care when due.
a00b0eb to
495775c
Compare
Signed-off-by: Arthur Schiwon <[email protected]>
Previously we had a
COUNT(*)against the filecache table. At least on MySQL's InnoDB this caused a full table scan and could result on MySQL quitting for a too long running query. Since it was done live it also meant long loading times for the web interface as well as API call.This change moves the counting into the background and uses a cached value only. By default it is being updated every three hours, but can be configured via app config (example added in README). Further, it can be triggered manually via occ command (example also in README).