lib/db: Add Badger backend (fixes #5910) (#6250)

This commit is contained in:
Jakob Borg
2020-05-29 13:43:02 +02:00
committed by GitHub
parent ed6bfc5417
commit 94beed5c10
10 changed files with 644 additions and 9 deletions
+3 -1
View File
@@ -509,7 +509,9 @@ func (db *Lowlevel) newReadWriteTransaction() (readWriteTransaction, error) {
}
func (t readWriteTransaction) Commit() error {
t.readOnlyTransaction.close()
// The readOnlyTransaction must close after commit, because they may be
// backed by the same actual lower level transaction.
defer t.readOnlyTransaction.close()
return t.WriteTransaction.Commit()
}