Update options

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-09-18 15:17:13 +02:00
parent 3858309368
commit 01386a206c
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -29,8 +29,10 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper"
bdg "github.com/dgraph-io/badger/v2"
"github.com/ipfs/go-datastore"
badger "github.com/ipfs/go-ds-badger2"
"github.com/urfave/cli/v2"
"golang.org/x/xerrors"
)
@ -108,10 +110,10 @@ var importBenchCmd = &cli.Command{
bdgOpt := badger.DefaultOptions
bdgOpt.GcInterval = 0
bdgOpt.Options = bdg.DefaultOptions("")
bdgOpt.Options.SyncWrites = false
bdgOpt.Options.Truncate = true
bdgOpt.Options.DetectConflicts = false
bdgOpt.Options.MaxTableSize = 64 << 20
bds, err := badger.NewDatastore(tdir, &bdgOpt)
if err != nil {