mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 04:29:27 +08:00
IndexingRun.document() re-reads the journal and atomically rewrites the whole .indexing-run.json on every call. The LlamaIndex loader marks each accepted source "embedding" in a synchronous loop on the event loop, and publication marks every loaded Document (one per page) "completed" the same way, so recording n statuses costs O(n^2) bytes of I/O with no await in between. On a 4,320-document reindex this held the loop for over 100 s, /health/ready stopped answering, and the desktop supervisor killed the core. Add IndexingRun.documents(sources, status, **details), which applies one status to many sources under a single ownership check and a single journal write, and use it from the loader, the LlamaIndex publication step and the RAG service's indexed-file callback. document() now delegates to it, so single updates behave as before. Fixes #3046 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>