Dependent archives show only partial data or no report data #18773
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
Critical
Indicates the severity of an issue is very critical and the issue has a very high priority.
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone
refs DEV-2418 for more details.
When archiving a week, then in https://github.com/matomo-org/matomo/blob/4.7.1/core/Archive.php#L629-L643 we archive up to 2 days into the future. That means if today is
2022-02-09
, then when archiving this week we also archive2022-02-10
and2022-02-11
. I noticed this in the archive tables:In above screenshots we can see that the archive was created eg on 2nd Feb for a date in the future.
That means we create archives for in the future and of course these archives will have 0 data.
I assume that these archives in the future are also created for regular archives, not only dependent archives. However, I believe it works for these regular archives because they are invalidated again regularly and therefore the data is re-archived one or two days later. The logic for invalidating archives currently doesn't know which dependent archives exist with what segments. Meaning I'm assuming these get never invalidated.
I'm meaning calls like https://github.com/matomo-org/matomo/blob/4.7.1/plugins/Goals/Archiver.php#L124-L127
$this->getProcessor()->processDependentArchive('Goals', VisitFrequencyAPI::NEW_VISITOR_SEGMENT);
. These calls also happen in non-core plugins specifically MediaAnalytics for example. As a result, the media map always shows 0 data unless if for some reason there is rarely already some data there.Not sure if we still need to allow archiving any date in the future and why this is there in https://github.com/matomo-org/matomo/blob/4.7.1/core/Archive.php#L629-L643 . This code goes back 9 years. There are likely few ways to fix this:
The goals of this issue is that Media Analytics Map works again correctly (see DEV-2418 for all the details). We can see this eg on demo
processDependentArchive
.I've also created a related issue: "invalidation for dependent archives doesn't work" in #18772 . Depending how this issue is fixed, the other issue will be fixed too. I separated them because this one might be easier to fix by changing to not archive data in the future anymore.
The text was updated successfully, but these errors were encountered: