[#323] cmd/node: Set BoltDB timeout option of Metabase component

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-01-18 16:04:13 +03:00 committed by Alex Vanin
parent a9c1f88b8a
commit 3bf1519b1d

View file

@ -36,6 +36,7 @@ import (
"github.com/panjf2000/ants/v2" "github.com/panjf2000/ants/v2"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/spf13/viper" "github.com/spf13/viper"
"go.etcd.io/bbolt"
"go.uber.org/atomic" "go.uber.org/atomic"
"go.uber.org/zap" "go.uber.org/zap"
"google.golang.org/grpc" "google.golang.org/grpc"
@ -572,6 +573,9 @@ func initShardOptions(c *cfg) {
meta.WithLogger(c.log), meta.WithLogger(c.log),
meta.WithPath(metaPath), meta.WithPath(metaPath),
meta.WithPermissions(metaPerm), meta.WithPermissions(metaPerm),
meta.WithBoltDBOptions(&bbolt.Options{
Timeout: 100 * time.Millisecond,
}),
), ),
shard.WithWriteCache(useCache), shard.WithWriteCache(useCache),
shard.WithWriteCacheOptions( shard.WithWriteCacheOptions(