From a9c1f88b8aaca42ace2f0ca22d7ae408917bce88 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 18 Jan 2021 16:03:00 +0300 Subject: [PATCH] [#323] storage/blobovnicza: Add Timeout option of BoltDB instances Signed-off-by: Leonard Lyubich --- pkg/local_object_storage/blobovnicza/blobovnicza.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/local_object_storage/blobovnicza/blobovnicza.go b/pkg/local_object_storage/blobovnicza/blobovnicza.go index b03359720..77701ff21 100644 --- a/pkg/local_object_storage/blobovnicza/blobovnicza.go +++ b/pkg/local_object_storage/blobovnicza/blobovnicza.go @@ -2,6 +2,7 @@ package blobovnicza import ( "os" + "time" "github.com/nspcc-dev/neofs-node/pkg/util/logger" "go.etcd.io/bbolt" @@ -43,6 +44,9 @@ func defaultCfg() *cfg { return &cfg{ boltDBCfg: boltDBCfg{ perm: os.ModePerm, // 0777 + boltOptions: &bbolt.Options{ + Timeout: 100 * time.Millisecond, + }, }, fullSizeLimit: 1 << 30, // 1GB objSizeLimit: 1 << 20, // 1MB