diff options
Diffstat (limited to 'weed/storage/volume_loading.go')
| -rw-r--r-- | weed/storage/volume_loading.go | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/weed/storage/volume_loading.go b/weed/storage/volume_loading.go index 4be860987..457d50410 100644 --- a/weed/storage/volume_loading.go +++ b/weed/storage/volume_loading.go @@ -70,20 +70,25 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind } switch needleMapKind { case NeedleMapInMemory: - glog.V(0).Infoln("loading index file", fileName+".idx", "readonly", v.readOnly) - if v.nm, e = LoadNeedleMap(indexFile); e != nil { - glog.V(0).Infof("loading index %s error: %v", fileName+".idx", e) + glog.V(0).Infoln("loading index", fileName+".idx", "to memory readonly", v.readOnly) + if v.nm, e = LoadCompactNeedleMap(indexFile); e != nil { + glog.V(0).Infof("loading index %s to memory error: %v", fileName+".idx", e) } case NeedleMapLevelDb: - glog.V(0).Infoln("loading leveldb file", fileName+".ldb") + glog.V(0).Infoln("loading leveldb", fileName+".ldb") if v.nm, e = NewLevelDbNeedleMap(fileName+".ldb", indexFile); e != nil { glog.V(0).Infof("loading leveldb %s error: %v", fileName+".ldb", e) } case NeedleMapBoltDb: - glog.V(0).Infoln("loading boltdb file", fileName+".bdb") + glog.V(0).Infoln("loading boltdb", fileName+".bdb") if v.nm, e = NewBoltDbNeedleMap(fileName+".bdb", indexFile); e != nil { glog.V(0).Infof("loading boltdb %s error: %v", fileName+".bdb", e) } + case NeedleMapBtree: + glog.V(0).Infoln("loading index", fileName+".idx", "to btree readonly", v.readOnly) + if v.nm, e = LoadBtreeNeedleMap(indexFile); e != nil { + glog.V(0).Infof("loading index %s to btree error: %v", fileName+".idx", e) + } } } |
