Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


ArchiveProcessing: duplicate idArchive #987

robocoder opened this Issue · 3 comments

2 participants



SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '166-done' for key 'PRIMARY'

I don't know if this is the root cause or a contributing factor, but loadNextIdArchive() does not auto-increment. (klando's pgsql port uses a sequence object here. However, if archiving should fail, it results in an orphaned row.)

The quick fix is to add the IGNORE (discard) keyword to the INSERT.

Ideally, Multiple concurrent archiving processes should be avoidable...


Multiple concurrent archiving could be avoidable by a database-level lock, or by a simple file based lock.

However, agreed with you that Piwik should not fail while this lock system is not implemented. agreed on the quick fix using IGNORE (I believe it won't have side effects).


(In [1767]) refs #987 - add IGNORE keyword (MySQL-ism)


closing.. we can create a ticket later for implementing a lock mechanism

@robocoder robocoder added this to the Piwik 0.5.5 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.