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
consume all response body in order to release requests
Chris Lu0b301b0b4786
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.goindex f59c7e1a98..c036bce3bd 100644--- a/weed/operation/upload_content.go+++ b/weed/operation/upload_content.go@@ -226,6 +226,10 @@ func upload_content(uploadUrl string, fillBufferFunction func(w io.Writer) errorreturn nil, fmt.Errorf("failing to upload to %v: %v", uploadUrl, post_err)}defer resp.Body.Close()+ resp_body, ra_err := ioutil.ReadAll(resp.Body)+ if ra_err != nil {+ return nil, ra_err+ }var ret UploadResultetag := getEtag(resp)@@ -233,10 +237,7 @@ func upload_content(uploadUrl string, fillBufferFunction func(w io.Writer) errorret.ETag = etagreturn &ret, nil}- resp_body, ra_err := ioutil.ReadAll(resp.Body)- if ra_err != nil {- return nil, ra_err- }+unmarshal_err := json.Unmarshal(resp_body, &ret)if unmarshal_err != nil {glog.V(0).Infoln("failing to read upload response", uploadUrl, string(resp_body))