mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
leveldb recover error handling
This commit is contained in:
parent
5d3ec22975
commit
ef2b3a0801
|
@ -53,8 +53,10 @@ func (store *LevelDBStore) initialize(dir string) (err error) {
|
|||
if errors.IsCorrupted(err) {
|
||||
store.db, err = leveldb.RecoverFile(dir, opts)
|
||||
}
|
||||
glog.Infof("filer store open dir %s: %v", dir, err)
|
||||
return
|
||||
if err != nil {
|
||||
glog.Infof("filer store open dir %s: %v", dir, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -38,7 +38,9 @@ func NewLevelDbNeedleMap(dbFileName string, indexFile *os.File, opts *opt.Option
|
|||
if errors.IsCorrupted(err) {
|
||||
m.db, err = leveldb.RecoverFile(dbFileName, opts)
|
||||
}
|
||||
return
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
glog.V(1).Infof("Loading %s...", indexFile.Name())
|
||||
mm, indexLoadError := newNeedleMapMetricFromIndexFile(indexFile)
|
||||
|
|
Loading…
Reference in a new issue