An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: 自动校验数据库索引 https://github.com/siyuan-note/siyuan/issues/7016
Liang Dingdba12d6111db
diff --git a/kernel/model/transaction.go b/kernel/model/transaction.goindex e330791f29..7c70ada93b 100644--- a/kernel/model/transaction.go+++ b/kernel/model/transaction.go@@ -1230,11 +1230,13 @@ func autoFixIndex() {for rootID, updated := range rootUpdated {root := sql.GetBlock(rootID)if nil == root {+ logging.LogWarnf("not found tree [%s] in database, reindex it", rootID)reindexTree(rootID)continue}if "" == updated {+ // BlockTree 迁移,v2.6.3 之前没有 updated 字段reindexTree(rootID)continue}@@ -1242,12 +1244,15 @@ func autoFixIndex() {btUpdated, _ := time.Parse("20060102150405", updated)dbUpdated, _ := time.Parse("20060102150405", root.Updated)if dbUpdated.Before(btUpdated.Add(-1 * time.Minute)) {+ logging.LogWarnf("tree [%s] is not up to date, reindex it", rootID)reindexTree(rootID)continue}roots := sql.GetBlockRedundant(rootID)if 1 < len(roots) {+ logging.LogWarnf("exist more than one tree [%s], reindex it", rootID)+ sql.RemoveTreeQueue(root.Box, rootID)reindexTree(rootID)continue}