From d90aa31d5f5b846c13bbeabfbd7d89260c21020c Mon Sep 17 00:00:00 2001 From: chrislu Date: Sun, 13 Nov 2022 23:30:23 -0800 Subject: [PATCH] filer store: skip disabled location specific filer store initialization fix https://github.com/seaweedfs/seaweedfs/issues/3971 --- weed/filer/configuration.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weed/filer/configuration.go b/weed/filer/configuration.go index 563ef1d55..4ed19eee3 100644 --- a/weed/filer/configuration.go +++ b/weed/filer/configuration.go @@ -63,6 +63,11 @@ func (f *Filer) LoadConfiguration(config *util.ViperProxy) (isFresh bool) { if !found { continue } + + if !config.GetBool(key + ".enabled") { + continue + } + store = reflect.New(reflect.ValueOf(store).Elem().Type()).Interface().(FilerStore) if err := store.Initialize(config, key+"."); err != nil { glog.Fatalf("Failed to initialize store for %s: %+v", key, err)