本地数据库同步模式从关闭改为NORMAL,以降低损坏概率

This commit is contained in:
GoEdgeLab
2023-10-06 00:49:37 +08:00
parent 5cf6db7710
commit 1a7cd63478
5 changed files with 20 additions and 29 deletions

View File

@@ -458,7 +458,7 @@ func (this *FileList) UpgradeV3(oldDir string, brokenOnError bool) error {
remotelogs.Println("CACHE", "upgrading local database finished")
}()
db, err := dbs.OpenWriter("file:" + indexDBPath + "?cache=shared&mode=rwc&_journal_mode=WAL&_sync=OFF&_locking_mode=EXCLUSIVE")
db, err := dbs.OpenWriter("file:" + indexDBPath + "?cache=shared&mode=rwc&_journal_mode=WAL&_sync=NORMAL&_locking_mode=EXCLUSIVE")
if err != nil {
return err
}