I've seen this here in UI tests:
As one can see the archive was created multiple times
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
idarchive for the same idsite, same dates and period. This is a bug as Piwik should not archive twice the exact same archive.
(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.
So it's not possible when e.g. you archive two times current day (so those will be only temporary archives)?
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.
What I meant was the fact, that multiple archives for same date and period with different idarchive can be created at the same day
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).
If yes, then the provided screenshot doesn't have to mean that there's a bug.
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
SQLSTATE: Integrity constraint violation: 1062 Duplicate entry 'archive_numeric_2014_09' for key 'PRIMARY')
we're again seen this error "Integrity constraint violation 1062 duplicate entry archivenumeric*"