nextcloud / nextcloud/recognize

Upgrade from 32 to 33.0.0 -> SQLSTATE[23000]

Open
#1,458 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug upstream
Dominant language
PHP
Stars
699
Forks
68
Avg merge
1d 4h
Merged PRs (30d)
5

Description

Which version of recognize are you using?

11.0.1

Enabled Modes

Face recognition

TensorFlow mode

Normal mode

Downstream App

Files App

Which Nextcloud version do you have installed?

33.0.0

Which Operating system do you have installed?

Arch Linux

Which database are you running Nextcloud on?

MariaDB 12.2.2

Which Docker container are you using to run Nextcloud? (if applicable)

No response

How much RAM does your server have?

64GiB

What processor Architecture does your CPU have?

AMD Ryzen 9 7950X3D 16-Core Processor

Describe the Bug

Since I upgraded to NC33, I noticed a lot of DB errors in the log like such:
An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5573-1024-768-6-0--1' for key 'previews_file_uniq_idx'
I tried the occ reset commands but it didn't help.

Expected Behavior

Not to have DB errors.

To Reproduce

Use Recognize since 33.0.0.

Debug log

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the SQLSTATE[23000] duplicate-entry error when using Recognize with Nextcloud 33.0.0, focusing on the previews_file_uniq_idx constraint and the reported occ reset commands. Compare the database behavior with the upgrade context and determine what change prevents the recurring errors; done means normal use no longer produces these database errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
mariadb, php
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.