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

LINK_LIVE_PHOTOS jobs lost when clearing queue after METADATA_EXTRACTION job completes #12306

Open
1 of 3 tasks
mPyKen opened this issue Sep 4, 2024 · 0 comments
Open
1 of 3 tasks

Comments

@mPyKen
Copy link
Contributor

mPyKen commented Sep 4, 2024

The bug

The METADATA_EXTRACTION job sets metadataExtractedAt. If one clears the Extract Metadata queue, the subsequent LINK_LIVE_PHOTOS job will not execute as they are appended to the queue after the METADATA_EXTRACTION job. A restart of Extract Metadata job on 'missing' assets does not pick up the linkage jobs but completely ignores them.

Background: I have been wondering why the Extract Metadata queue does not decrease in size and have been stopping, clearing, and restarting the queue multiple times as it looked like a bug. What actually happens is that for each processed METADATA_EXTRACTION job, a LINK_LIVE_PHOTOS job is appended to the same queue. Thus, on restart, the queue size decreased as metadataExtractedAt was set, but now the LINK_LIVE_PHOTOS jobs have not been run for a large part of my assets.

Suggested solutions:
a) Set metadataExtractedAt only after LINK_LIVE_PHOTOS has completed and prioritize the LINK_LIVE_PHOTOS job so that the queue size actually decreases instead of waiting for all the METADATA_EXTRACTION jobs to complete first.
b) Merge LINK_LIVE_PHOTOS job into METADATA_EXTRACTION job
c) Create a separate queue to be able to run the LINK_LIVE_PHOTOS jobs by themselves

Version of Immich Server

v1.113.1

Platform with the issue

  • Server
  • Web
  • Mobile

Reproduction steps

Start Metadata Extraction on multiple missing assets, let it extract from 1 asset, cancel job, clear queue. Start Metadata Extraction on missing assets again. LINK_LIVE_PHOTOS has not been run on the first extracted asset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant