lib/db, lib/syncthing: Don't repair DB on upgrade, but on error (fixes #6917) (#6971)

This commit is contained in:
Simon Frei
2020-09-10 10:54:41 +02:00
committed by GitHub
parent c5c23ed10f
commit 08bebbe59b
9 changed files with 111 additions and 61 deletions
+3
View File
@@ -109,6 +109,8 @@ type Iterator interface {
// consider always using a transaction of the appropriate type. The
// transaction isolation level is "read committed" - there are no dirty
// reads.
// Location returns the path to the database, as given to Open. The returned string
// is empty for a db in memory.
type Backend interface {
Reader
Writer
@@ -116,6 +118,7 @@ type Backend interface {
NewWriteTransaction(hooks ...CommitHook) (WriteTransaction, error)
Close() error
Compact() error
Location() string
}
type Tuning int