aboutsummaryrefslogtreecommitdiff
path: root/weed/operation/upload_content.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2021-03-12 15:05:31 +0800
committerGitHub <noreply@github.com>2021-03-12 15:05:31 +0800
commit17d02264f33f501e124060ade7b0b39e687aaa3d (patch)
tree0b80a2d7bc9fd99d7b68e8c06080a9a062fffd35 /weed/operation/upload_content.go
parent620b91f23eaf5718088dc9ddcf91540967d0c8a6 (diff)
parent5f99eee27c0f48ebc10e79241650be3727124af2 (diff)
downloadseaweedfs-17d02264f33f501e124060ade7b0b39e687aaa3d.tar.xz
seaweedfs-17d02264f33f501e124060ade7b0b39e687aaa3d.zip
Merge pull request #74 from chrislusf/master
sync
Diffstat (limited to 'weed/operation/upload_content.go')
-rw-r--r--weed/operation/upload_content.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go
index 70428bb07..9957a04cd 100644
--- a/weed/operation/upload_content.go
+++ b/weed/operation/upload_content.go
@@ -31,6 +31,7 @@ type UploadResult struct {
Mime string `json:"mime,omitempty"`
Gzip uint32 `json:"gzip,omitempty"`
ContentMd5 string `json:"contentMd5,omitempty"`
+ RetryCount int `json:"-"`
}
func (uploadResult *UploadResult) ToPbFileChunk(fileId string, offset int64) *filer_pb.FileChunk {
@@ -96,6 +97,7 @@ func retriedUploadData(uploadUrl string, filename string, cipher bool, data []by
for i := 0; i < 3; i++ {
uploadResult, err = doUploadData(uploadUrl, filename, cipher, data, isInputCompressed, mtype, pairMap, jwt)
if err == nil {
+ uploadResult.RetryCount = i
return
} else {
glog.Warningf("uploading to %s: %v", uploadUrl, err)