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

Refactor archivers to support multiple idsites #13168

Merged
merged 3 commits into from Jul 17, 2018
Merged

Refactor archivers to support multiple idsites #13168

merged 3 commits into from Jul 17, 2018

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Jul 16, 2018

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.

@tsteur tsteur added Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Jul 16, 2018
@tsteur tsteur added Needs Review PRs that need a code review and removed Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. labels Jul 16, 2018
@sgiehl
Copy link
Member

sgiehl commented Jul 16, 2018

The reason this worked in the past was simply that it was never called with multiple idsites, otherwise it would have directly failed.

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));
Copy link
Member Author

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.

@tsteur
Copy link
Member Author

tsteur commented Jul 16, 2018

@sgiehl added a test 👍

@mattab mattab self-requested a review July 17, 2018 08:46
Copy link
Member

@mattab mattab left a 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 👍

@tsteur tsteur merged commit 74334d8 into 3.x-dev Jul 17, 2018
@tsteur tsteur deleted the 13162 branch July 17, 2018 20:34
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
* refactor archivers to support multiple idsites

* added a test to ensure multiple sites work

* add comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants