v1.2_bolt #3

Closed
dstepanov-yadro wants to merge 2 commits from v1.2_bolt into support/v0.36
4 changed files with 4 additions and 2 deletions
Showing only changes of commit 9eb0c7535b - Show all commits

2
go.mod
View file

@ -29,7 +29,7 @@ require (
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.15.0
github.com/stretchr/testify v1.8.2
go.etcd.io/bbolt v1.3.6
go.etcd.io/bbolt v1.3.7
go.opentelemetry.io/otel v1.14.0
go.opentelemetry.io/otel/trace v1.14.0
go.uber.org/atomic v1.10.0

BIN
go.sum

Binary file not shown.

View file

@ -46,7 +46,8 @@ func defaultCfg(c *cfg) {
boltDBCfg: boltDBCfg{
perm: os.ModePerm, // 0777
boltOptions: &bbolt.Options{
Timeout: 100 * time.Millisecond,
Timeout: 100 * time.Millisecond,
FreelistType: bbolt.FreelistMapType,
},
},
fullSizeLimit: 1 << 30, // 1GB

View file

@ -109,6 +109,7 @@ func (t *boltForest) Open(readOnly bool) error {
opts.NoSync = t.noSync
opts.Timeout = 100 * time.Millisecond
opts.OpenFile = t.openFile
opts.FreelistType = bbolt.FreelistMapType
t.db, err = bbolt.Open(t.path, t.perm, &opts)
if err != nil {