fix(worker): null-safe embedding dedup queries #611
Loading…
Reference in a new issue
No description provided.
Delete branch "hotfix/worker-embedding-null-comparison"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hotfix: Embedding write failure
Root cause: Dedup SELECT in
upsertOccurrenceEmbeddinguses((col IS NULL AND :param IS NULL) OR col = :param)pattern. PostgreSQL cannot type-check the parameter when it's null, causing PSQLException → JDBC connection leak → pool exhaustion → worker crash loop.Fix: Replace with
IS NOT DISTINCT FROM CAST(:param AS text)— null-safe, already used in PlaceLookupService/PlaceGazetteerImportService.Scope: 2 SQL queries in WorkerResultService.java (class_occurrence_embeddings + pending_face_embeddings dedup checks). No migration. No other files affected.
Verified: Compiles clean. Version bumped to 1.08.