mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-10-17 05:14:19 +02:00
purgeIndexedSource() deleted Qdrant points before removing the KbIngestState row. If the row-delete failed or the process died in between, the source vanished from Qdrant's orphan-detection signal but the ghost state row stayed forever — nothing else ever revisits a row with no matching file and no matching Qdrant source. Reversing the order means a failure instead leaves points in Qdrant, which the next sync's reverse orphan sweep will find and retry; both steps are already idempotent, so a retry from either partial state is safe. Also switch scanAndSyncStorage()'s orphan-candidate filter from denylisting known non-scanned roots (README.md/docs) to allowlisting the two roots _discoverKbFiles() actually scans (kb_uploads, zim), via a new shared _kbScanRoots() helper. A denylist silently treats any future source root outside kb_uploads/zim as an orphan the first time it's added — the same class of bug the denylist itself was written to fix for docs. |
||
|---|---|---|
| .. | ||
| controllers | ||
| data | ||
| exceptions | ||
| jobs | ||
| middleware | ||
| models | ||
| services | ||
| utils | ||
| validators | ||