forked from TrueCloudLab/frostfs-node
writecache: provide timeout to bbolt.Open
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
68a0112193
commit
38772e1a2e
1 changed files with 2 additions and 0 deletions
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue