mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-04 21:59:31 +08:00
* fix(llamaindex): fail bounded when indexing stalls Indexing steps run in a sync executor thread. An embedding provider that accepts a request but never completes it can stall the executor future forever: HTTP timeouts only bound a single attempt and provider retries extend the wait far beyond any reasonable budget. Add a stall guard that watches the embedding progress heartbeat and raises a clear error once no progress has been reported for a bounded window (default 10 minutes), instead of hanging indefinitely. Fixes #946 * fix(rag): re-arm the stall heartbeat each poll tick `set_progress_callback` writes to the process-global LlamaIndex `Settings` embed model, which holds exactly one callback slot. A second indexing job started while the first runs displaced the first job's heartbeat, so its `last_progress` stopped advancing and the guard raised `IndexingStallError` against a job that was indexing normally — turning what used to be merely lost progress reporting into a hard failure. Reclaim the slot on every poll tick. Missing a few notifications for one tick is harmless; never observing our own progress again is not. The guard is now consciously biased toward false negatives: it can be slow to notice a genuine stall while another job indexes, and never fails a job that is making progress. --------- Co-authored-by: 0xtidalbore <ahmed@itcloud.ca> Co-authored-by: Frank <bingxizhao@novix.science>