fix(search): fast-fail during reindex instead of hanging requests - #12
Merged
Conversation
- Live repro 2026-08-25: full reindex blocked every MCP call ~7.5 min (timeouts incl. debug_runtime_passport); search is the primary victim. - Searcher.hybrid_search_async checks db_manager.is_reindexing() at entry -> instant 'busy, retry in seconds' instead of waiting minutes. Guard methods already exist in LanceDBManager; only the query path missed the check. - Strict 'is True' check: MagicMock-truthy trap (incident 2026-08-13) broke 6 hybrid-cache/searcher tests on first attempt; fixed + verified 9/9.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Живое воспроизведение 2026-08-25: полная переиндексация блокировала ВСЕ вызовы ~7.5 мин (таймауты вплоть до passport); поиск — главная жертва.
Фикс: Searcher.hybrid_search_async проверяет db_manager.is_reindexing() на входе и отвечает мгновенным «⏳ индекс перестраивается — повторите через несколько секунд» вместо минут зависания. Методы set/clear/is_reindexing уже существуют в LanceDBManager — не хватало только проверки в пути запроса.
Строгая проверка
is True: первая попытка уронила 6 тестов (MagicMock-truthy, инцидент 2026-08-13) — исправлено, 9/9 зелёные, полный pytest в gate-zero прошёл.Остаётся открытым: механизм полного зависания (passport тоже молчал) требует отдельной трассировки; set_project не влияет на reindex-скоуп (job идёт по CWD) — следующий пункт.