ArchiveProcessing: duplicate idArchive #987

robocoder opened this Issue Sep 16, 2009 · 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...

Piwik Open Source Analytics member

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)

Piwik Open Source Analytics member

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

@robocoder robocoder added this to the Piwik 0.5.5 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment