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
avoid []byte reuse
Chris Lu0ecff9521d54
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.goindex 3e96b59098..ac0b477cba 100644--- a/weed/operation/upload_content.go+++ b/weed/operation/upload_content.go@@ -81,14 +81,11 @@ func doUpload(uploadUrl string, filename string, cipher bool, reader io.Reader,if ok {data = bytesReader.Bytes} else {- buf := bytebufferpool.Get()- _, err = buf.ReadFrom(reader)- defer bytebufferpool.Put(buf)+ data, err = ioutil.ReadAll(reader)if err != nil {err = fmt.Errorf("read input: %v", err)return}- data = buf.Bytes()}uploadResult, uploadErr := retriedUploadData(uploadUrl, filename, cipher, data, isInputCompressed, mtype, pairMap, jwt)return uploadResult, uploadErr, data