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
Apply max execution query time to Live.getCounters API and queryAdjacentVisitorId method #18852
Conversation
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.
Had a look through the code. Everything seems to make sense. New tests have been added and all tests still seem to pass. Should be good to merge.
@sgiehl can you confirm you tested it and not just looked at the code? I tested it too but be good to have confirmation |
@tsteur Yes, local testing is always part of a review. But I actually only had a look at the "Visits in Real-time" widget. What could be improved would be the error handling of the "Real Time Visitor Count" widget. As it currently shows this when it exceeds the execution time: And if the first request works but a subsequent request fails, it shows a global notification with the error message. |
👍 That should be fixed now @sgiehl |
Found another widget that is affected by the change. We have a widget matomo/plugins/Live/Controller.php Line 169 in 285bbfd
|
@sgiehl I couldn't reproduce this one, or at least not due to this change. It might be an existing issue? We could create a new issue for it? The visitor query is handled in the private |
@tsteur but matomo/plugins/Live/VisitorProfile.php Lines 94 to 97 in 1155273
|
@sgiehl this should be handled in https://github.com/matomo-org/matomo/pull/18852/files#diff-e3bdcefa5a3431d680f8e0d579f6d4f9be13cc944663b725983b7a703465d6aeR94 ? Or is that not working for you? |
Had another look at that. I'm still seeing the error. Debugged it though, and the problem seems to be this: Line 220 in 8770ed0
|
@sgiehl that would be an existing error and not related to this PR? |
@tsteur Than it might be a regression from the first PR introducing the query time limit for live reports. |
created #18900 |
Description:
Noticed the max execution query configuration is not applied to live counters which it is now. When the query takes too long, then it will show a
dash
and a tooltip explaining that it took too long to get the data. The message may vary depending if a segment is selected or notFor queryAdjacentVisitorId if there's a timeout we simply assume that no next or previous visitor was found.
Checked https://matomo.org/faq/how-to/how-can-i-automatically-stop-long-running-database-queries/ which doesn't need to be updated by the looks.
Review