Isolate Milvus collections by embedding model#2979
Isolate Milvus collections by embedding model#2979LiemFrans wants to merge 1 commit intoHKUDS:mainfrom
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7aaf56c436
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self._activate_existing_collection(self.legacy_namespace) | ||
| logger.info( | ||
| f"[{self.workspace}] Reusing compatible legacy collection '{self.legacy_namespace}' for namespace '{self.namespace}'" | ||
| ) | ||
| return True |
There was a problem hiding this comment.
Skip legacy reuse when embedding model identity is unknown
This branch reuses the unsuffixed legacy collection whenever _activate_existing_collection succeeds, but that compatibility path validates only schema and vector dimension, not the embedding model identity. In a migration from one model to another with the same dimension (for example, two different 1536d models), initialization will silently bind to the old legacy collection and mix incompatible vectors, which undermines retrieval correctness and defeats the model-isolation goal.
Useful? React with 👍 / 👎.
Description
Prevent Milvus startup failures when an existing unsuffixed collection was created with a different embedding model or vector dimension. This aligns Milvus with the model-aware isolation already used by other vector backends while still preserving compatible legacy collections.
Related Issues
Vector dimension mismatch for collection 'entities': existing=4096, current=2560.Changes Made
model_namevalues.Checklist
Additional Notes
./scripts/test.sh tests/test_milvus_index_creation.py.HKUDS/LightRAG:main.LiemFrans:fix/milvus-model-isolation.