ImageOptim / ImageOptim/ImageOptim

Query failed: UNIQUE constraint failed

Open
#80 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
10k
Forks
478
PR merge metrics
No merged PRs in 30d

Description

I'm processing a rather large set (over 1.8 million) of files through a bash script looping over some directories and I've encountered the following query failure. I'm not able to discern if there is any impact on the optimization of the images throwing these errors. Also I can't correlate the error on the CLI to an image in the UI.
2015-02-12 15:43:42.845 ImageOptim[34722:1713639] Query failed: UNIQUE constraint failed: results.inputs_hashsh in INSERT INTO results(inputs_hashsh, size, status) VALUES(x'6a20badcde8acb920bda0d43348863d2', 59427, 1)

Is it safe to simply ignore this query error? I'm not certain due to the above reasoning but I think there are duplicate files in separate folders that cause this due to the hash collision?

Contributor guide

No contributing guide indexed for this repository

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

The report names no source file, test, or entry point. Start by tracing the shown INSERT INTO results(inputs_hashsh, size, status) query and reproduce the duplicate-key case with the bash workload; done means determining whether image optimization is affected and how a failing image can be identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, sql
Domain
databases, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.