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

This commit is contained in:
刘祥超
2023-10-06 00:49:37 +08:00
parent b73f0ae2c9
commit 69e4dd6cfe
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
}