diff options
| author | chrislu <chris.lu@gmail.com> | 2022-05-30 22:47:29 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-05-30 22:47:29 -0700 |
| commit | f4a6da6cb276f1891b01097670b044fd4ee6139d (patch) | |
| tree | 8b92c13091e1d9973ce21e4f0c9ac143bd667cfd /weed/filer/configuration.go | |
| parent | 596c3860cac83a75ae9ce728c8a043133c03d098 (diff) | |
| parent | ca01ce05249c336ed380d9f77efbee68213b8a37 (diff) | |
| download | seaweedfs-f4a6da6cb276f1891b01097670b044fd4ee6139d.tar.xz seaweedfs-f4a6da6cb276f1891b01097670b044fd4ee6139d.zip | |
Merge branch 'master' of https://github.com/chrislusf/seaweedfs
Diffstat (limited to 'weed/filer/configuration.go')
| -rw-r--r-- | weed/filer/configuration.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/filer/configuration.go b/weed/filer/configuration.go index 9ef2f3e0f..85fc65d13 100644 --- a/weed/filer/configuration.go +++ b/weed/filer/configuration.go @@ -12,7 +12,7 @@ var ( Stores []FilerStore ) -func (f *Filer) LoadConfiguration(config *util.ViperProxy) { +func (f *Filer) LoadConfiguration(config *util.ViperProxy) (isFresh bool) { validateOneEnabledStore(config) @@ -24,7 +24,7 @@ func (f *Filer) LoadConfiguration(config *util.ViperProxy) { if err := store.Initialize(config, store.GetName()+"."); err != nil { glog.Fatalf("failed to initialize store for %s: %+v", store.GetName(), err) } - f.SetStore(store) + isFresh = f.SetStore(store) glog.V(0).Infof("configured filer store to %s", store.GetName()) hasDefaultStoreConfigured = true break @@ -77,6 +77,7 @@ func (f *Filer) LoadConfiguration(config *util.ViperProxy) { glog.V(0).Infof("configure filer %s for %s", store.GetName(), location) } + return } func validateOneEnabledStore(config *util.ViperProxy) { |
