[#584] Disable compression in badger writecache
Some checks failed
Build / Build Components (1.20) (pull_request) Failing after 3s
Build / Build Components (1.21) (pull_request) Failing after 2s
Tests and linters / Lint (pull_request) Failing after 4s
Tests and linters / Tests (1.20) (pull_request) Failing after 3s
Tests and linters / Tests (1.21) (pull_request) Failing after 3s
Tests and linters / Tests with -race (pull_request) Failing after 3s
Tests and linters / Staticcheck (pull_request) Failing after 3s
Vulncheck / Vulncheck (pull_request) Failing after 3s
Some checks failed
Build / Build Components (1.20) (pull_request) Failing after 3s
Build / Build Components (1.21) (pull_request) Failing after 2s
Tests and linters / Lint (pull_request) Failing after 4s
Tests and linters / Tests (1.20) (pull_request) Failing after 3s
Tests and linters / Tests (1.21) (pull_request) Failing after 3s
Tests and linters / Tests with -race (pull_request) Failing after 3s
Tests and linters / Staticcheck (pull_request) Failing after 3s
Vulncheck / Vulncheck (pull_request) Failing after 3s
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
d641cba2fc
commit
023b90342c
1 changed files with 2 additions and 0 deletions
|
@ -5,6 +5,7 @@ import (
|
||||||
|
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||||
"github.com/dgraph-io/badger/v4"
|
"github.com/dgraph-io/badger/v4"
|
||||||
|
badgeroptions "github.com/dgraph-io/badger/v4/options"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OpenDB opens a badger instance for write-cache. Opens in read-only mode if ro is true.
|
// OpenDB opens a badger instance for write-cache. Opens in read-only mode if ro is true.
|
||||||
|
@ -12,6 +13,7 @@ func OpenDB(p string, ro bool, l *logger.Logger) (*badger.DB, error) {
|
||||||
return badger.Open(badger.DefaultOptions(p).
|
return badger.Open(badger.DefaultOptions(p).
|
||||||
WithReadOnly(ro).
|
WithReadOnly(ro).
|
||||||
WithSyncWrites(true).
|
WithSyncWrites(true).
|
||||||
|
WithCompression(badgeroptions.None).
|
||||||
WithLoggingLevel(badger.ERROR).
|
WithLoggingLevel(badger.ERROR).
|
||||||
WithLogger(badgerLoggerWrapper{l}))
|
WithLogger(badgerLoggerWrapper{l}))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue