This update introduces checks for vector dimension compatibility before migrating legacy data in both PostgreSQL and Qdrant storage implementations. If a dimension mismatch is detected, the migration is skipped to prevent data loss, and a new empty table or collection is created for the new embedding model. Key changes include: - Added dimension checks in `PGVectorStorage` and `QdrantVectorDBStorage` classes. - Enhanced logging to inform users about dimension mismatches and the creation of new storage. - Updated E2E tests to validate the new behavior, ensuring legacy data is preserved and new structures are created correctly. Impact: - Prevents potential data corruption during migrations with mismatched dimensions. - Improves user experience by providing clear logging and maintaining legacy data integrity. Testing: - New tests confirm that the system behaves as expected when encountering dimension mismatches. |
||
|---|---|---|
| .. | ||
| conftest.py | ||
| README_WORKSPACE_ISOLATION_TESTS.md | ||
| test_aquery_data_endpoint.py | ||
| test_base_storage_integrity.py | ||
| test_curl_aquery_data.sh | ||
| test_dimension_mismatch.py | ||
| test_e2e_multi_instance.py | ||
| test_embedding_func.py | ||
| test_graph_storage.py | ||
| test_lightrag_ollama_chat.py | ||
| test_postgres_migration.py | ||
| test_postgres_retry_integration.py | ||
| test_qdrant_migration.py | ||
| test_workspace_isolation.py | ||
| test_write_json_optimization.py | ||