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.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
mount: pass along replication and collection parameters
Chris Lu69f0da5d73b6
diff --git a/weed/filesys/wfs_write.go b/weed/filesys/wfs_write.goindex e7db31203d..27b2297edf 100644--- a/weed/filesys/wfs_write.go+++ b/weed/filesys/wfs_write.go@@ -65,6 +65,6 @@ func (wfs *WFS) saveDataAsChunk(dir string) filer.SaveDataAsChunkFunctionType {wfs.chunkCache.SetChunk(fileId, data)chunk = uploadResult.ToPbFileChunk(fileId, offset)- return chunk, "", "", nil+ return chunk, collection, replication, nil}}diff --git a/weed/server/filer_server_handlers_write.go b/weed/server/filer_server_handlers_write.goindex 0091ae3cec..584ab98231 100644--- a/weed/server/filer_server_handlers_write.go+++ b/weed/server/filer_server_handlers_write.go@@ -139,6 +139,7 @@ func (fs *FilerServer) detectCollection(requestURI, qCollection, qReplication st}// required by buckets folder+ bucketDefaultReplication := ""if strings.HasPrefix(requestURI, fs.filer.DirBucketsPath+"/") {bucketAndObjectKey := requestURI[len(fs.filer.DirBucketsPath)+1:]t := strings.Index(bucketAndObjectKey, "/")@@ -148,7 +149,10 @@ func (fs *FilerServer) detectCollection(requestURI, qCollection, qReplication stif t > 0 {collection = bucketAndObjectKey[:t]}- replication, fsync = fs.filer.ReadBucketOption(collection)+ bucketDefaultReplication, fsync = fs.filer.ReadBucketOption(collection)+ }+ if replication == "" {+ replication = bucketDefaultReplication}return