Skip to content

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

:art: Improve data indexing stability https://github.com/siyuan-note/siyuan/issues/17610

Daniel1987ec3aba9a
diff --git a/kernel/sql/queue.go b/kernel/sql/queue.go
index 697a4a3ddf..5c23a2e3d0 100644
--- a/kernel/sql/queue.go
+++ b/kernel/sql/queue.go
@@ -40,7 +40,6 @@ var (
operationQueue []*dbQueueOperation
dbQueueLock = sync.Mutex{}
dbQueueCond = sync.NewCond(&dbQueueLock)
- txLock = sync.Mutex{}
)
type dbQueueOperation struct {
@@ -113,11 +112,9 @@ func FlushQueue() {
return
}
- txLock.Lock()
flushingTx.Store(true)
defer func() {
flushingTx.Store(false)
- txLock.Unlock()
// 通知等待的协程队列已刷新完成
dbQueueCond.Broadcast()
}()