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): face search migration sometimes failing #10827

Merged
merged 6 commits into from
Jul 4, 2024

Conversation

mertalev
Copy link
Contributor

@mertalev mertalev commented Jul 3, 2024

Description

There can be an edge case that causes index creation to fail. Switching the data type to a basic real array and back to the vector type fixes this. Additionally handles not having an embedding column as there are a number of people who don't have it.

Tested by using an old DB, dropping the embedding columns of asset_faces and smart_search and confirming that the server was able to start up. The tables look correct in DataGrip. However, the face_search and smart_search tables in this case are empty (as expected), but I haven't tested that the migration still copies face embeddings in the typical case. It should, but as this is a sensitive area it should be explicitly tested.

@mertalev mertalev requested a review from danieldietzler as a code owner July 3, 2024 22:40
@mertalev mertalev force-pushed the fix/server-face-search-migration branch from e66bf03 to ee5f191 Compare July 3, 2024 22:45
@alextran1502 alextran1502 merged commit 0b88bef into main Jul 4, 2024
23 checks passed
@alextran1502 alextran1502 deleted the fix/server-face-search-migration branch July 4, 2024 02:02
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