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.

todo: load path-specific store from filer.toml

Chris Lu0d5683fb0e6b
diff --git a/weed/filer/configuration.go b/weed/filer/configuration.go
index 3dce67d6d1..d04ab06cbb 100644
--- a/weed/filer/configuration.go
+++ b/weed/filer/configuration.go
@@ -27,6 +27,9 @@ func (f *Filer) LoadConfiguration(config *viper.Viper) {
}
}
+ // TODO load path-specific filer store here
+ // f.Store.AddPathSpecificStore(path, store)
+
println()
println("Supported filer stores are:")
for _, store := range Stores {
diff --git a/weed/filer/filerstore.go b/weed/filer/filerstore.go
index a2b81c5d97..5e10bb0a68 100644
--- a/weed/filer/filerstore.go
+++ b/weed/filer/filerstore.go
@@ -50,6 +50,7 @@ type VirtualFilerStore interface {
FilerStore
DeleteHardLink(ctx context.Context, hardLinkId HardLinkId) error
DeleteOneEntry(ctx context.Context, entry *Entry) error
+ AddPathSpecificStore(path string, store FilerStore)
}
type FilerStoreWrapper struct {
@@ -67,7 +68,7 @@ func NewFilerStoreWrapper(store FilerStore) *FilerStoreWrapper {
}
}
-func (fsw *FilerStoreWrapper) addStore(path string, store FilerStore) {
+func (fsw *FilerStoreWrapper) AddPathSpecificStore(path string, store FilerStore) {
fsw.pathToStore.Put([]byte(path), store)
}