Skip to content

Commit

Permalink
Merge pull request #4512 from filecoin-project/feat/disable-bloom
Browse files Browse the repository at this point in the history
Disable blockstore bloom filter
  • Loading branch information
magik6k authored Oct 21, 2020
2 parents c767399 + 3a46c15 commit 8cad245
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/blockstore/blockstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,16 @@ type GCLocker = blockstore.GCLocker

var NewGCLocker = blockstore.NewGCLocker
var NewGCBlockstore = blockstore.NewGCBlockstore
var DefaultCacheOpts = blockstore.DefaultCacheOpts
var ErrNotFound = blockstore.ErrNotFound

func DefaultCacheOpts() CacheOpts {
return CacheOpts{
HasBloomFilterSize: 0,
HasBloomFilterHashes: 0,
HasARCCacheSize: 512 << 10,
}
}

func CachedBlockstore(ctx context.Context, bs Blockstore, opts CacheOpts) (Blockstore, error) {
bs, err := blockstore.CachedBlockstore(ctx, bs, opts)
if err != nil {
Expand Down

0 comments on commit 8cad245

Please sign in to comment.