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
refactoring
Chris Lu1b8e3da295d1
diff --git a/weed/server/filer_server_handlers_write_autochunk.go b/weed/server/filer_server_handlers_write_autochunk.goindex 43884bfde6..2bd1104d32 100644--- a/weed/server/filer_server_handlers_write_autochunk.go+++ b/weed/server/filer_server_handlers_write_autochunk.go@@ -96,12 +96,6 @@ func (fs *FilerServer) doPostAutoChunk(ctx context.Context, w http.ResponseWritereturn nil, nil, err}- fileChunks, replyerr = filer.MaybeManifestize(fs.saveAsChunk(so), fileChunks)- if replyerr != nil {- glog.V(0).Infof("manifestize %s: %v", r.RequestURI, replyerr)- return- }-md5bytes = md5Hash.Sum(nil)filerResult, replyerr = fs.saveMetaData(ctx, r, fileName, contentType, so, md5bytes, fileChunks, chunkOffset, smallContent)@@ -121,12 +115,6 @@ func (fs *FilerServer) doPutAutoChunk(ctx context.Context, w http.ResponseWriterreturn nil, nil, err}- fileChunks, replyerr = filer.MaybeManifestize(fs.saveAsChunk(so), fileChunks)- if replyerr != nil {- glog.V(0).Infof("manifestize %s: %v", r.RequestURI, replyerr)- return- }-md5bytes = md5Hash.Sum(nil)filerResult, replyerr = fs.saveMetaData(ctx, r, fileName, contentType, so, md5bytes, fileChunks, chunkOffset, smallContent)@@ -135,6 +123,13 @@ func (fs *FilerServer) doPutAutoChunk(ctx context.Context, w http.ResponseWriterfunc (fs *FilerServer) saveMetaData(ctx context.Context, r *http.Request, fileName string, contentType string, so *operation.StorageOption, md5bytes []byte, fileChunks []*filer_pb.FileChunk, chunkOffset int64, content []byte) (filerResult *FilerPostResult, replyerr error) {+ // maybe compact chunks+ fileChunks, replyerr = filer.MaybeManifestize(fs.saveAsChunk(so), fileChunks)+ if replyerr != nil {+ glog.V(0).Infof("manifestize %s: %v", r.RequestURI, replyerr)+ return+ }+// detect file modemodeStr := r.URL.Query().Get("mode")if modeStr == "" {