memories icon indicating copy to clipboard operation
memories copied to clipboard

Integrity constraint violation: 1062 Duplicate entry '2550877' for key 'memories_fileid_index'

Open solracsf opened this issue 1 year ago • 3 comments

Describe the bug While running occ memories:index I can observe a lot of duplicate keys errors.

To Reproduce Steps to reproduce the behavior: run occ memories:index

Screenshots If applicable, add screenshots to help explain your problem.

Platform:

  • OS: [e.g. iOS] Linux
  • Browser: [e.g. Chrome, Safari] CLI
  • Memories Version: [e.g. 4.1.0] 6.1.1
  • Nextcloud Version: [e.g. 25.0.6] 27.1.6
  • PHP Version: [e.g. 8.1] 8.2

Additional context Add any other context about the problem here.

  • Any errors in the JS console? N/A
  • Any errors in the Nextcloud server logs?
{
  "reqId": "QnI15aSC1PWaiIhUBavZ",
  "level": 3,
  "time": "2024-02-10T19:36:55+01:00",
  "remoteAddr": "",
  "user": "--",
  "app": "memories",
  "method": "",
  "url": "--",
  "message": "Failed to index file /[email protected]/files/Défi groupe 2/IMG-20230916-WA0023.jpg: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2395716' for key 'memories_fileid_index'",
  "userAgent": "--",
  "version": "27.1.6.2",
  "data": {
    "app": "memories"
  },
  "id": "65c7c27539e95"
}

solracsf avatar Feb 10 '24 18:02 solracsf

  1. Are you using redis for locking?
  2. Which database?

If you're on mysql, looks like there's something wrong with your Nextcloud instance

pulsejet avatar Mar 05 '24 19:03 pulsejet

  1. Yes
  2. MariaDB 10.6

solracsf avatar Mar 06 '24 10:03 solracsf

Okay, there might be something wrong with the locking then. Either way, just ignore the errors and you'll be fine

pulsejet avatar Mar 07 '24 14:03 pulsejet