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
Refactor archivers to support multiple idsites #13168
Conversation
Any possibility to easily add some tests with multiple site ids now? |
* In Matomo 4.0 we should maybe remove this event, and instead maybe always archive from raw data when it is daily archive, | ||
* no matter if single site or not. We cannot do this in Matomo 3.X as some custom plugin archivers may not be able to handle multiple sites. | ||
*/ | ||
Piwik::postEvent('ArchiveProcessor.shouldAggregateFromRawData', array(&$shouldAggregateFromRawData, $this->params)); |
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.
I've set the event to be ignored for now. I can see it may be useful if someone actually wanted to aggregate week or month from raw data as well but usually that doesn't happen. It will be useful though in the meantime not only for the tests but also for Roll-Up reporting which soon may or may not force the archiving from raw data when there are multiple sites.
@sgiehl added a test 👍 |
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.
Looks simple and straightforward 👍
* refactor archivers to support multiple idsites * added a test to ensure multiple sites work * add comment
refs #13162
After looking into the code this seems to be way easier to implement than I thought it would be. This is because the bind was already always supporting multiple sites but only the query was not. The reason this worked in the past was simply that it was never called with multiple idsites, otherwise it would have directly failed.