From 38772e1a2e896be4846513e323289bf6da54d3e7 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 9 Jun 2022 14:08:13 +0300 Subject: [PATCH] writecache: provide timeout to `bbolt.Open` Signed-off-by: Evgenii Stratonikov --- pkg/local_object_storage/writecache/util.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/local_object_storage/writecache/util.go b/pkg/local_object_storage/writecache/util.go index 8ff30b362..26e24194e 100644 --- a/pkg/local_object_storage/writecache/util.go +++ b/pkg/local_object_storage/writecache/util.go @@ -3,6 +3,7 @@ package writecache import ( "os" "path/filepath" + "time" "go.etcd.io/bbolt" ) @@ -13,5 +14,6 @@ func OpenDB(p string, ro bool) (*bbolt.DB, error) { NoFreelistSync: true, NoSync: true, ReadOnly: ro, + Timeout: 100 * time.Millisecond, }) }