WeKnora/internal/application/repository/retriever/qdrant
Leon 562b131e6c
fix(qdrant): treat a missing dimension collection as an empty delete target (#3419)
* fix(qdrant): treat a missing dimension collection as an empty delete target

Ingest and re-index re-index a chunk by deleting its old vectors first and
writing the new ones second (`updateChunkVector`, `syncChunkIndex`). Vectors
are stored in a per-dimension collection that is created lazily by that first
write, so when the delete is the first touch of a dimension, Qdrant answers
`Collection weknora_embeddings_<dim> doesn't exist!` and the delete fails --
taking down the write that would have created the collection (#3337).

`VectorRetrieve` already treats a missing collection as "no results". Apply the
same rule to the three delete paths: probe once, skip the RPC when the
collection is absent, and keep failing loudly when the probe itself fails.
Dimensions this process already created stay cache-short-circuited, so the
steady-state delete is still a single round-trip.

* fix(qdrant): treat a missing collection on Delete as a no-op

A stale initializedCollections cache still issued DeletePoints after a
Qdrant wipe, which revived Collection ... doesn't exist! and blocked the
write that would recreate the collection. Drop the cache on that error
so the following ensureCollection can run.

---------

Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-20 11:12:18 +08:00
..
move.go refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
repository.go fix(qdrant): treat a missing dimension collection as an empty delete target (#3419) 2026-09-20 11:12:18 +08:00
repository_test.go fix(qdrant): treat a missing dimension collection as an empty delete target (#3419) 2026-09-20 11:12:18 +08:00
structs.go feat: pass IndexConfig to repositories with scalability options 2026-04-17 16:52:24 +08:00