Opened 5 years ago

Closed 4 years ago

#987 closed Bug (fixed)

ArchiveProcessing: duplicate idArchive

Reported by: vipsoft Owned by:
Priority: normal Milestone: Piwik 0.5.5
Component: Core Keywords:
Cc: Sensitive: no

Description (last modified by vipsoft)

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

Change History (5)

comment:1 Changed 5 years ago by vipsoft (robocoder)

  • Description modified (diff)

comment:2 Changed 5 years ago by matt (mattab)

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

comment:3 Changed 4 years ago by vipsoft (robocoder)

  • Milestone changed from 1 - Piwik 0.5 to 1 - Piwik 0.5.1

comment:4 Changed 4 years ago by vipsoft (robocoder)

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

comment:5 Changed 4 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.