update to latest bbolt (db library) v1.3.11

with a fix for releasing pages allocated during a transaction that was rolled
back.

also bumps required go version to go1.22
This commit is contained in:
Mechiel Lukkien
2024-08-22 16:14:26 +02:00
parent 016fde8d78
commit 0bb4501472
10 changed files with 42 additions and 12 deletions

7
vendor/go.etcd.io/bbolt/tx.go generated vendored
View File

@ -1,6 +1,7 @@
package bbolt
import (
"errors"
"fmt"
"io"
"os"
@ -185,6 +186,10 @@ func (tx *Tx) Commit() error {
// If the high water mark has moved up then attempt to grow the database.
if tx.meta.pgid > opgid {
_ = errors.New("")
// gofail: var lackOfDiskSpace string
// tx.rollback()
// return errors.New(lackOfDiskSpace)
if err := tx.db.grow(int(tx.meta.pgid+1) * tx.db.pageSize); err != nil {
tx.rollback()
return err
@ -470,6 +475,7 @@ func (tx *Tx) write() error {
// Ignore file sync if flag is set on DB.
if !tx.db.NoSync || IgnoreNoSync {
// gofail: var beforeSyncDataPages struct{}
if err := fdatasync(tx.db); err != nil {
return err
}
@ -507,6 +513,7 @@ func (tx *Tx) writeMeta() error {
return err
}
if !tx.db.NoSync || IgnoreNoSync {
// gofail: var beforeSyncMetaPage struct{}
if err := fdatasync(tx.db); err != nil {
return err
}