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
Auto Archiving falls back to DEFAULT_DATE_LAST even if last archiving ran until completion #15086
Comments
(edited, had an unrelated environment bug) I hope this could get prioritized as an 3.12.1 release, it has an huge impact on our setup right now, and a lot of manual work is needed. |
I reckon this could explain maybe some timeouts in the tests. 👍 |
I've only had a very quick look. I reckon it might be related to https://github.com/matomo-org/matomo/pull/14639/files#diff-9bca48e482124d44a3d910acc809194eR561-R567 and that we're now invalidating reports for today which was not the case before. It seems as a result, the last process date is being ignored here and set to I don't know if I understand correctly but it seems to always fallback to Be good if someone could have a look. |
Yeah I have seen that last52 in some other cases also. |
Our current workaround for this is to run the archive process with |
fix #65 Undo commit 88a49b1 refs matomo-org/matomo#15086
fix #65 Undo commit 88a49b1 refs matomo-org/matomo#15086
Hi,
There seems to be an issue with auto archiving not picking up the correct date for when the last archive was completed successfully. This results in the pre-processing of
period = day
to be set todate = last52
rather than the actual last date/time.First indication of this error was that all archive logs show
period = day
being set todate = last52
:Testing this a low-volume site was chosen, all segments / historical data was purged for that that site (14). Then normal archiving was forced for site 14:
Then fake tracking data was added to the site, so that the archive job would start on next schedule.
Notice that on the next run, for site 14 the pre-process values for day:
period = day, date = last52
The archive code indicates that last52 is the default value for days and months (https://github.com/matomo-org/matomo/blob/3.x-dev/core/CronArchive.php#L52-L54). There is also a function
getDateLastN
(https://github.com/matomo-org/matomo/blob/3.x-dev/core/CronArchive.php#L1617-L1641) that returns the expectedlastX
value. Same method also defineslast2
as the minimum value to return.Looking at db table
matomo_options
, I find'lastRunArchiveday_14', '1572530779', '0'
where the EPOCH value is10/31/2019 @ 2:06pm (UTC)
, which matches the last archive run as stated above. It seems matomo is storing the correct completion value, but for some reason useslast52
rather thanlast2
which seems to be the correct value.Running the archive job a third time for site 14, updates the
lastRunArchiveday_14
value in matomo_options, but still the archiver wants to proceed with a date value oflast52
:I'm not good with PHP so I'm having trouble figuring out where there might be a bug, but I'm suspecting that this is the code that causes issue:
https://github.com/matomo-org/matomo/blob/3.x-dev/core/CronArchive.php#L1625
Let me know if there is anything missing to help with resolving the issue
The text was updated successfully, but these errors were encountered: