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
Ensure that the archive algorithm cannot be triggered multiple times for a same site/period/segment #8444
Comments
But actually it should work so - e.g. for current day/week/month/year. Then temporary archives are purged once a day. Could you check the Additionally sometimes it makes sense if there's some missing data. E.g. if one updates from old Piwik version (e.g. 1.6 -> latest) then it makes sense to rearchive some data (e.g. returning visitors because latest Piwik is using a segment to calculate it). But maybe it's a different case (new segment). |
I do not have the database anymore. Should have made a dump :( It happened when starting a UI test when inserting the fixture so there should be no reason for duplicated archives |
@quba on the screenshots there are two done flags with different (this probably regressed a long time ago but still a regression as it used to work eg. in 2.0 or earlier) |
So it's not possible when e.g. you archive two times current day (so those will be only temporary archives)? Same works for current periods which are always temporary. |
Not sure what you meant, but what I mean is:
|
Yes, that's one case. What I meant was the fact, that multiple archives for same date and period with different idarchive can be created at the same day (e.g. temporary archives created today for period=day,week,month,year). Is that correct? If yes, then the provided screenshot doesn't have to mean that there's a bug. On the other hand, those archives are for the year 2012 so it may be also connected with concurrency. |
this works well as long as you don't make concurrent requests. Piwik will only create one archive when necessary, eg. temporary archives will be re-created if the last temporary is older than N seconds (as per general settings).
the screenshot is clearly a bug because:
|
(not 100% sure but I suppose this bug report in forum: https://forum.piwik.org/t/sql-error-sqlstate-23000-integrity-constraint-violation-1062-duplicate-entry-archive-numeric-2014-09-for-key-primary/17863 is caused by this bug here. The error is visible in the dashboard |
This should be solved by #18243 |
refs #1938
I've seen this here in UI tests:
As one can see the archive was created multiple times
The text was updated successfully, but these errors were encountered: