Skip to content

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

:art: 迁出快照和同步数据生成冲突副本不再等待数据库事务执行

Liang Dingbf31293395a4
diff --git a/kernel/model/repository.go b/kernel/model/repository.go
index 5238b6f5ba..39c1ab21b7 100644
--- a/kernel/model/repository.go
+++ b/kernel/model/repository.go
@@ -49,7 +49,6 @@ import (
"github.com/siyuan-note/siyuan/kernel/cache"
"github.com/siyuan-note/siyuan/kernel/conf"
"github.com/siyuan-note/siyuan/kernel/filesys"
- "github.com/siyuan-note/siyuan/kernel/sql"
"github.com/siyuan-note/siyuan/kernel/task"
"github.com/siyuan-note/siyuan/kernel/treenode"
"github.com/siyuan-note/siyuan/kernel/util"
@@ -523,7 +522,6 @@ func checkoutRepo(id string) {
util.PushEndlessProgress(Conf.Language(63))
WaitForWritingFiles()
- sql.WaitForWritingDatabase()
CloseWatchAssets()
defer WatchAssets()
@@ -941,7 +939,6 @@ func syncRepo(exit, byHand bool) (err error) {
// 云端同步发生冲突时生成副本 https://github.com/siyuan-note/siyuan/issues/5687
luteEngine := NewLute()
- waitTx := false
for _, file := range mergeResult.Conflicts {
if !strings.HasSuffix(file.Path, ".sy") {
continue
@@ -964,10 +961,6 @@ func syncRepo(exit, byHand bool) (err error) {
resetTree(tree, "Conflicted")
createTreeTx(tree)
- waitTx = true
- }
- if waitTx {
- sql.WaitForWritingDatabase()
}
}