[#1647] writecache: Open DB in sync mode

Close #1647.

Initially, `Sync: false` was provided because we can already lose
objects cached in memory. However, future changes in writecache will
remove inmemory cache and speed up it via other means.

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-08-15 14:59:01 +03:00 committed by LeL
parent 89cba2cc7b
commit 4e361e2ab4

View file

@ -12,7 +12,6 @@ import (
func OpenDB(p string, ro bool) (*bbolt.DB, error) {
return bbolt.Open(filepath.Join(p, dbName), os.ModePerm, &bbolt.Options{
NoFreelistSync: true,
NoSync: true,
ReadOnly: ro,
Timeout: 100 * time.Millisecond,
})