Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:sparkles: Semantic search using AI embeddings https://github.com/siyuan-note/siyuan/issues/17788

Daniel889014569583
diff --git a/kernel/model/embedding.go b/kernel/model/embedding.go
index 0d211d7e00..51ad95292b 100644
--- a/kernel/model/embedding.go
+++ b/kernel/model/embedding.go
@@ -147,6 +147,9 @@ func processPendingEmbeddings() {
defer workersWg.Done()
for job := range workCh {
if embeddingStop.Load() {
+ // 本轮已熔断(其它 worker 处理失败触发),这些积压 job 里的块不能直接丢弃,
+ // 否则它们仍为 e.id IS NULL,下轮被反复捞出却永远不被写行。按失败处理写占位行。
+ recordFailedEmbedding(job.blocks, "round stopped due to earlier failure in this round")
continue
}
doEmbedAndStore(job.texts, job.blocks)