aboutsummaryrefslogtreecommitdiff
path: root/weed
diff options
context:
space:
mode:
Diffstat (limited to 'weed')
-rw-r--r--weed/storage/needle_map_metric.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/storage/needle_map_metric.go b/weed/storage/needle_map_metric.go
index 3618dada9..7cf48dd72 100644
--- a/weed/storage/needle_map_metric.go
+++ b/weed/storage/needle_map_metric.go
@@ -7,7 +7,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/storage/idx"
. "github.com/chrislusf/seaweedfs/weed/storage/types"
- "github.com/willf/bloom"
+ "github.com/tylertreat/BoomFilters"
)
type mapMetric struct {
@@ -93,10 +93,10 @@ func (mm *mapMetric) MaybeSetMaxFileKey(key NeedleId) {
func newNeedleMapMetricFromIndexFile(r *os.File) (mm *mapMetric, err error) {
mm = &mapMetric{}
- var bf *bloom.BloomFilter
+ var bf *boom.StableBloomFilter
buf := make([]byte, NeedleIdSize)
err = reverseWalkIndexFile(r, func(entryCount int64) {
- bf = bloom.NewWithEstimates(uint(entryCount), 0.001)
+ bf = boom.NewDefaultStableBloomFilter(uint(entryCount), 0.001)
}, func(key NeedleId, offset Offset, size Size) error {
mm.MaybeSetMaxFileKey(key)