Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

filer: report error if the path specific store is not found

Chris Luf5a19a87be8e
diff --git a/weed/filer/configuration.go b/weed/filer/configuration.go
index 5f5dfed25d..af9c759627 100644
--- a/weed/filer/configuration.go
+++ b/weed/filer/configuration.go
@@ -59,7 +59,11 @@ func (f *Filer) LoadConfiguration(config *viper.Viper) {
parts := strings.Split(key, ".")
storeName, storeId := parts[0], parts[1]
- store := storeNames[storeName]
+ store, found := storeNames[storeName]
+ if !found {
+ glog.Errorf("path-specific filer store %s.%s is not found", storeName, storeId)
+ os.Exit(-1)
+ }
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)