Skip to content
Snippets Groups Projects
Unverified Commit 5e2e96ec authored by Luca Moser's avatar Luca Moser Committed by GitHub
Browse files

disable badger-db compression (#237)

parent 56213be0
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import (
"sync"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
"github.com/iotaledger/goshimmer/packages/parameter"
"github.com/iotaledger/hive.go/database"
"github.com/iotaledger/hive.go/logger"
......@@ -56,6 +57,13 @@ func GetBadgerInstance() *badger.DB {
opts = opts.WithTruncate(true)
}
opts.CompactL0OnClose = false
opts.KeepL0InMemory = false
opts.VerifyValueChecksum = false
opts.ZSTDCompressionLevel = 1
opts.Compression = options.None
opts.MaxCacheSize = 50000000
db, err := database.CreateDB(dbDir, opts)
if err != nil {
// errors should cause a panic to avoid singleton deadlocks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment