This commit is contained in:
Chris Lu 2019-07-02 21:28:51 -07:00
parent 23d36dfbaf
commit 4d579f7f57

View File

@ -49,9 +49,9 @@ func (store *LevelDB2Store) initialize(dir string, dbCount int) (err error) {
for d := 0 ; d < dbCount; d++ { for d := 0 ; d < dbCount; d++ {
dbFolder := fmt.Sprintf("%s/%02d", dir, d) dbFolder := fmt.Sprintf("%s/%02d", dir, d)
os.MkdirAll(dbFolder, 0755) os.MkdirAll(dbFolder, 0755)
db, err := leveldb.OpenFile(dbFolder, opts) db, dbErr := leveldb.OpenFile(dbFolder, opts)
if err != nil { if dbErr != nil {
glog.Errorf("filer store open dir %s: %v", dbFolder, err) glog.Errorf("filer store open dir %s: %v", dbFolder, dbErr)
return return
} }
store.dbs = append(store.dbs, db) store.dbs = append(store.dbs, db)