Merge pull request #2728 from kmlebedev/set_default_leveldb2

This commit is contained in:
Chris Lu 2022-03-06 07:26:30 -08:00 committed by GitHub
commit 89cd0c27a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,8 +130,8 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
go fs.filer.KeepMasterClientConnected() go fs.filer.KeepMasterClientConnected()
if !util.LoadConfiguration("filer", false) { if !util.LoadConfiguration("filer", false) {
v.Set("leveldb2.enabled", true) v.SetDefault("leveldb2.enabled", true)
v.Set("leveldb2.dir", option.DefaultLevelDbDir) v.SetDefault("leveldb2.dir", option.DefaultLevelDbDir)
_, err := os.Stat(option.DefaultLevelDbDir) _, err := os.Stat(option.DefaultLevelDbDir)
if os.IsNotExist(err) { if os.IsNotExist(err) {
os.MkdirAll(option.DefaultLevelDbDir, 0755) os.MkdirAll(option.DefaultLevelDbDir, 0755)