[#1505] pilorama: Provide timeout to `bbolt.Open`

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
remotes/fyrchik/tree-errors
Evgenii Stratonikov 2022-06-09 14:10:01 +03:00 committed by fyrchik
parent 26041f18bf
commit d62723f038
1 changed files with 2 additions and 0 deletions

View File

@ -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 {