Skip to content

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

:art: 同步时跳过校验数据库索引

Liang Ding12a78e968285
diff --git a/kernel/model/transaction.go b/kernel/model/transaction.go
index ce90b5177e..2f992bd8ca 100644
--- a/kernel/model/transaction.go
+++ b/kernel/model/transaction.go
@@ -1234,7 +1234,17 @@ var autoFixLock = sync.Mutex{}
func autoFixIndex() {
defer logging.Recover()
- if util.IsMutexLocked(&autoFixLock) || isFullReindexing {
+ if isFullReindexing {
+ logging.LogInfof("skip check index caused by full reindexing")
+ return
+ }
+
+ if util.IsMutexLocked(&syncLock) {
+ logging.LogInfof("skip check index caused by sync lock")
+ return
+ }
+
+ if util.IsMutexLocked(&autoFixLock) {
return
}