From e2c7be3a2e91056a6402fc70a979aa273c15fcd2 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 9 May 2018 03:50:14 -0700 Subject: [PATCH] adjust the needle mapper as discussed on https://github.com/chrislusf/seaweedfs/pull/642#issuecomment-387606960 --- weed/storage/needle_map_boltdb.go | 2 +- weed/storage/needle_map_leveldb.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/storage/needle_map_boltdb.go b/weed/storage/needle_map_boltdb.go index cbcc786af..4492aaeff 100644 --- a/weed/storage/needle_map_boltdb.go +++ b/weed/storage/needle_map_boltdb.go @@ -32,7 +32,7 @@ func NewBoltDbNeedleMap(dbFileName string, indexFile *os.File) (m *BoltDbNeedleM return } glog.V(1).Infof("Loading %s...", indexFile.Name()) - nm, indexLoadError := LoadBtreeNeedleMap(indexFile) + nm, indexLoadError := NewBoltDbNeedleMap(dbFileName, indexFile) if indexLoadError != nil { return nil, indexLoadError } diff --git a/weed/storage/needle_map_leveldb.go b/weed/storage/needle_map_leveldb.go index 78dffaf7d..b0a4735b5 100644 --- a/weed/storage/needle_map_leveldb.go +++ b/weed/storage/needle_map_leveldb.go @@ -30,7 +30,7 @@ func NewLevelDbNeedleMap(dbFileName string, indexFile *os.File) (m *LevelDbNeedl return } glog.V(1).Infof("Loading %s...", indexFile.Name()) - nm, indexLoadError := LoadBtreeNeedleMap(indexFile) + nm, indexLoadError := NewLevelDbNeedleMap(dbFileName, indexFile) if indexLoadError != nil { return nil, indexLoadError }