Why these changes are needed: 1. LightRAG wraps embedding_func with priority_limit_async_func_call decorator, causing loss of get_model_identifier method 2. UnifiedLock.__aexit__ set main_lock_released flag incorrectly How it solves them: 1. _generate_collection_suffix now tries multiple approaches: - First check if embedding_func has get_model_identifier - Fallback to original EmbeddingFunc in global_config - Return empty string for backward compatibility 2. Move main_lock_released = True inside the if block so flag is only set when lock actually exists and is released Impact: - Fixes E2E tests that initialize complete LightRAG instances - Fixes incorrect async lock cleanup in exception scenarios - Maintains backward compatibility Testing: All unit tests pass (test_qdrant_migration.py, test_postgres_migration.py) |
||
|---|---|---|
| .. | ||
| api | ||
| evaluation | ||
| kg | ||
| llm | ||
| tools | ||
| __init__.py | ||
| base.py | ||
| constants.py | ||
| exceptions.py | ||
| lightrag.py | ||
| namespace.py | ||
| operate.py | ||
| prompt.py | ||
| rerank.py | ||
| types.py | ||
| utils.py | ||
| utils_graph.py | ||