Bug 1a - RuntimeError when _registry_guard is None: - Added explicit check for _registry_guard initialization - Now raises clear RuntimeError instead of cryptic TypeError - Helps users understand they need to call initialize_share_data() first Bug 1b - Workspace async_locks not visible across processes: - Created new _workspace_async_locks dict for per-process storage - Fixed issue where async_locks modifications in one process were invisible to others - This is correct design since asyncio.Lock objects cannot be pickled/shared Why per-process async_locks: - asyncio.Lock objects cannot be shared across processes - Each process needs its own asyncio.Lock instances for coroutine sync - Cross-process sync is handled by Manager.RLock() in _sync_locks - Within-process async sync is handled by per-process asyncio.Lock Testing: - All 17 existing workspace lock tests pass - Added 3 new tests specifically for bug verification - Total 20 tests passing Impact: - Fixes potential race conditions in multiprocess scenarios - Ensures proper synchronization both across and within processes - Maintains backward compatibility |
||
|---|---|---|
| .. | ||
| 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 | ||