@robocoder opened this Issue on September 16th 2009 Contributor

Symptom:

http://forum.piwik.org/index.php?showtopic=1513

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...

@mattab commented on September 22nd 2009 Owner

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).

@robocoder commented on January 3rd 2010 Contributor

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

@mattab commented on February 19th 2010 Owner

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

This Issue was closed on February 19th 2010
Powered by GitHub Issue Mirror