mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-12 05:52:39 +00:00
* fix: remove exclusive locks from read-only storage operations to eliminate lock contention read operations like search, list_scopes, get_scope_info, count across LanceDB, ChromaDB, and RAG adapters were holding exclusive locks unnecessarily. under multi-process prefork workers this caused RedisLock contention triggering a portalocker bug where AlreadyLocked is raised with the exceptions module as its arg. - remove store_lock from 7 LanceDB read methods since MVCC handles concurrent reads - remove store_lock from ChromaDB search/asearch which are thread-safe since v0.4 - remove store_lock from RAG core query and LanceDB adapter query - wrap lock_store BaseLockException with actionable error message - add exception handling in encoding_flow/recall_flow ThreadPoolExecutor calls - fix flow.py double-logging of ancestor listener errors * fix: remove dead conditional in filter_and_chunk fallback both branches of the if/else and the except all produced the same candidates = [scope_prefix] result, making the get_scope_info call and conditional pointless * fix: separate lock acquisition from caller body in lock_store the try/except wrapped the yield inside the contextmanager, which meant any BaseLockException raised by the caller's code inside the with block would be caught and re-raised with a misleading "Failed to acquire lock" message. split into acquire-then-yield so only actual acquisition failures get the actionable error message.