forked from TrueCloudLab/frostfs-node
[#1505] pilorama: Provide timeout to bbolt.Open
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
26041f18bf
commit
d62723f038
1 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"math/rand"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/io"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util"
|
||||
|
@ -66,6 +67,7 @@ func (t *boltForest) Open() error {
|
|||
|
||||
opts := *bbolt.DefaultOptions
|
||||
opts.NoSync = t.noSync
|
||||
opts.Timeout = 100 * time.Millisecond
|
||||
|
||||
t.db, err = bbolt.Open(t.path, t.perm, &opts)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue