lib/db: Use Commit() instead of commit() (#6330)
The readWriteTransaction offered both commit() (the one to use) and Commit() (via embedding) where the latter didn't close the read transaction. This removes the lower cased variant in order to prevent the mistake. The only place where the mistake was made was the new gc runner, where it would leave a read snapshot open forever.
This commit is contained in:
@@ -76,7 +76,7 @@ func addToBlockMap(db *Lowlevel, folder []byte, fs []protocol.FileInfo) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
return t.commit()
|
||||
return t.Commit()
|
||||
}
|
||||
|
||||
func discardFromBlockMap(db *Lowlevel, folder []byte, fs []protocol.FileInfo) error {
|
||||
@@ -101,7 +101,7 @@ func discardFromBlockMap(db *Lowlevel, folder []byte, fs []protocol.FileInfo) er
|
||||
}
|
||||
}
|
||||
}
|
||||
return t.commit()
|
||||
return t.Commit()
|
||||
}
|
||||
|
||||
func TestBlockMapAddUpdateWipe(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user