diff --git a/kv/mdbx/kv_mdbx.go b/kv/mdbx/kv_mdbx.go index e26f66ffe..346a6a3fd 100644 --- a/kv/mdbx/kv_mdbx.go +++ b/kv/mdbx/kv_mdbx.go @@ -74,7 +74,7 @@ func NewMDBX(log log.Logger) MdbxOpts { pageSize: kv.DefaultPageSize(), dirtySpace: 2 * (memory.TotalMemory() / 42), growthStep: 2 * datasize.GB, - mergeThreshold: 32768, + mergeThreshold: 3 * 8192, } return opts } @@ -192,9 +192,6 @@ func (opts MdbxOpts) Open() (kv.RwDB, error) { if dbg.MergeTr() > 0 { opts = opts.WriteMergeThreshold(uint64(dbg.MergeTr() * 8192)) //nolint } - if dbg.MergeTr() > 0 { - opts = opts.WriteMergeThreshold(uint64(dbg.MergeTr() * 8192)) //nolint - } if dbg.MdbxReadAhead() { opts = opts.Flags(func(u uint) uint { return u &^ mdbx.NoReadahead }) //nolint }