Skip to content
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

ArchiveProcessing: duplicate idArchive #987

Closed
robocoder opened this issue Sep 16, 2009 · 3 comments
Closed

ArchiveProcessing: duplicate idArchive #987

robocoder opened this issue Sep 16, 2009 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@robocoder
Copy link
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
Copy link
Member

mattab commented Sep 22, 2009

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
Copy link
Contributor Author

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

@mattab
Copy link
Member

mattab commented Feb 19, 2010

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
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants