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

fix(server): queue missing metadata #15864

Merged
merged 1 commit into from
Feb 4, 2025
Merged

fix(server): queue missing metadata #15864

merged 1 commit into from
Feb 4, 2025

Conversation

etnoy
Copy link
Contributor

@etnoy etnoy commented Feb 3, 2025

Since the kysely migration, we don't correctly queue the job of missing metadata.

If we upload a bunch of assets and restart the server before the metadata queue was finished, the asset_job_status table won't be populated with all assets. Then, the job looks for rows in that table that doesn't have metadata extraction run.

However, if the rows are never added this will return too few assets to queue, and those rows are only added at the end of metadata extraction.

Consequence: Assets with missing metadata don't get re-run unless you run the metadata job for all assets

Also added e2e tests for the job queue related to this.

Copy link
Contributor

@alextran1502 alextran1502 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for noticing this!

Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this problem exists for the other queries as well, like "without thumbnail", for example.

@jrasm91 jrasm91 merged commit b730aa6 into main Feb 4, 2025
37 checks passed
@jrasm91 jrasm91 deleted the fix/jobs-e2e branch February 4, 2025 09:00
@etnoy
Copy link
Contributor Author

etnoy commented Feb 4, 2025

Just checked and thumbnail already seems to be correct. I'll see what I can do about the rest.

image

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

Successfully merging this pull request may close these issues.

3 participants