Files
DeepTutor/tests/services
0xTidalBore 8d6a6e3a59 fix(llamaindex): fail bounded when indexing stalls (#953)
* 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>
2026-08-24 16:51:56 +08:00
..
2026-07-31 00:25:48 +08:00
2026-06-11 20:03:34 +08:00
2026-06-18 00:22:48 +08:00
2026-04-23 19:29:16 +08:00
2026-06-17 10:50:44 +08:00
2026-08-19 17:34:52 +08:00
2026-06-11 20:03:34 +08:00
2026-03-15 00:04:34 +08:00
2026-04-23 19:29:16 +08:00