From 023b90342cf9448cd9867a28dae04d7e90d4450c Mon Sep 17 00:00:00 2001 From: Alejandro Lopez Date: Thu, 10 Aug 2023 10:14:06 +0300 Subject: [PATCH] [#584] Disable compression in badger writecache Signed-off-by: Alejandro Lopez --- pkg/local_object_storage/writecache/writecachebadger/util.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/local_object_storage/writecache/writecachebadger/util.go b/pkg/local_object_storage/writecache/writecachebadger/util.go index e55ed119..e6079e37 100644 --- a/pkg/local_object_storage/writecache/writecachebadger/util.go +++ b/pkg/local_object_storage/writecache/writecachebadger/util.go @@ -5,6 +5,7 @@ import ( "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger" "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. @@ -12,6 +13,7 @@ func OpenDB(p string, ro bool, l *logger.Logger) (*badger.DB, error) { return badger.Open(badger.DefaultOptions(p). WithReadOnly(ro). WithSyncWrites(true). + WithCompression(badgeroptions.None). WithLoggingLevel(badger.ERROR). WithLogger(badgerLoggerWrapper{l})) }