-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Adds new hits metric to Actions.get report and All Websites Dashboard #22731
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
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.
Tested locally comparing an instance without the feature and with the feature, looked at the screenshots and some of the xml reports, ran the query manually for a custom date range to confirm getting the same number as in the UI.
@sgiehl can you please resolve the merge conflicts that probably come from submodule updates done in the interim. |
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.
The failing tests within the SystemTestsPlugins suites are from submodule plugins that need to be adjusted in separate repositories. The rest looks good, thanks @sgiehl!
@sgiehl this change generated over 8 million rows in the archive_invalidations table in my setup and basically broke archive generation. I removed the invalidations via |
We have already applied some improvements around that, but we are aware that too many invalidations can currently break archiving due to memory consumption issues. |
@sgiehl thanks a lot for the quick feedback. for me memory consumption is fine,I have dedicated over 30 GB memory to the archive cron, but the SQL queries take too long and are too many. my database already has many cores and a lot of memory, so I guess this would need a software optimisation within Matomo |
Archiving the hits metric only should actually not be causing too much trouble. Since this change this is also done during normal archiving anyway. The created invalidations during update were only added to make the metric also available for already created reports of the past |
Yes, after removing the invalidations, along with the ReArchiveList, archiving seems to be running fine again. I also think that in theory it should also be fine to run those invalidations as its just for the current month, but this seems to be a weak point of the invalidation code currently. We had exactly the same issue (invalidations overloading the archiver) when we upgraded the MultiChannelConversionAttribution plugin a few weeks ago. Only fix was to remove its invalidations, since it had created over half a million. |
Ok. Thanks for that valuable feedback. I guess we need to create such automated invalidations with more caution in the future, but also need to improve our code to handle that better. |
I am running 6 archivers concurrently (log says 12, but it detects one process twice due to two lines for each archiver in the process list shell output). Here is the log output of one archiver which ran about 12 hours before I stopped it:
What I observed while it ran:
|
Ok. Thanks that helps a lot. So it's caused by the query to look for the next archive to process rather then the queries to build the archives itself. |
@MichaelRoosz Just one more question: Are you using the roll up plugin and maybe have a rollup defined that includes all the sites that were included in the |
@sgiehl The Rollup plugin is activated, but so far we did not create any rollup site. What I think is causing the "idsite IN ()" is: The Migration from this PR calls:
so $idSites equals 'all', and then when the archiver runs, code execution is like this:
The SQL Query from my logs like the one |
Description:
This PR introduce a new record builder to archive the hits metric as part of the Actions plugin.
Furthermore this metric has been added to the Actions.get report and to all reports and the UI of the All Websites Dashboard.
To ensure this metric is correctly displayed without further interaction, the hits metric will be automatically invalidated through an update script for the current year.
fixes #18978
Note: This will require some updates to test in submodules. Will create PRs for those, once the review here was done.
Review