From b023e06483c54ef5b630871fe30e4bdebb9910f1 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Sun, 25 Dec 2022 21:54:07 +0700 Subject: [PATCH] save --- kv/mdbx/kv_mdbx.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kv/mdbx/kv_mdbx.go b/kv/mdbx/kv_mdbx.go index d3d627c5b..13624c60f 100644 --- a/kv/mdbx/kv_mdbx.go +++ b/kv/mdbx/kv_mdbx.go @@ -21,6 +21,7 @@ import ( "context" "encoding/binary" "fmt" + math2 "math" "os" "runtime" "sort" @@ -303,6 +304,9 @@ func (opts MdbxOpts) Open() (kv.RwDB, error) { env.Close() return nil, err } + if err := env.SetOption(mdbx.OptSyncBytes, uint64(math2.MaxUint64)); err != nil { + return nil, err + } } if opts.roTxsLimiter == nil {