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
Some periods may not be archived at all #9468
Comments
Hi @quba thanks for the report. Do you maybe have an idea how to reproduce this issue? |
E.g. track a few visit today some time, e.g. 4 p.m. and then stop tracking. The temporary archives will be purged tomorrow and no archiving will start tomorrow as there won't be new visits between last archiving and tomorrow. |
Reoccured today. The workaround is to add |
Do you maybe have the log output of that archiving? |
Also are there multiple archiver running at the same time? |
Can you also post all options that are used to run the archiver? |
Everything's fine with this archiving (minimum set of params, archiving once per hour). Data is there, but only temporary archives (deleted after some period of time). If after midnight there are no new visits, there's no possibility to run archiving and to create valid archives. |
Can you answer the other question? There are still checks whether a website has been processed since midnight but thinking it could be eg related to having multiple archives running at the same time. |
I couldn't really reproduce it so far I would say but it's hard to reproduce in general. I basically set the time when what ran etc hard in the code to reproduce it a bit more easily. The only thing I noticed is that https://github.com/piwik/piwik/blame/2.16.0/core/CronArchive.php#L1219 here the |
Great find Thomas. Bug was here since the beginning 4+ years ago 0508f2c |
I issued a PR. Possible that it fixes the issue but not 100% sure |
Which one? I don't have access to archiving logs anymore. There's only one archiving process. Minimum set of options. Just to make sure, I'll try to write down the use case (to confirm that this bug fix will cover this one).
|
I was especially wondering whether there are multiple archivers running at the same time. The description sounds like the fix in #10022 might help |
I can see that it's merged now. If it was there since the beginning, maybe it's worth adding a test to not regress? |
Additionally, the change was merged, not added to the changelog, available in 2.16.1. I think I don't get it really... |
@quba sorry we simply forgot to close this issue which should now be fixed! Yes we should add a test. we discussed it on friday and decided the CronArchiver should be refactored to allow easier testing. In general, this code needs some love and a set of tests. I'll create an issue and ref this one. |
just added |
In one of recent Piwik versions, a feature was introduced that checks if there are visits for given site ID between now and last archiving time, e.g.
- tracking data found for website id 52 (between 2016-01-04 00:36:23 and 2016-01-04 02:35:47)
But in case a site tracked visits only for a short period of time, it's possible that archiving won't run for a period bigger than day and this will lead to empty archives after those temporary are deleted.
I remember that in the past there was also a check that forced archiving for sites that reached midnight in their timezone. Currently it seems like this check is missing.
The text was updated successfully, but these errors were encountered: