writecache: provide timeout to `bbolt.Open`

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
remotes/fyrchik/changelog
Evgenii Stratonikov 2022-06-09 14:08:13 +03:00 committed by fyrchik
parent 68a0112193
commit 38772e1a2e
1 changed files with 2 additions and 0 deletions

View File

@ -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,
})
}