diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-09-09 11:21:23 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-09-09 11:21:23 -0700 |
| commit | 387ab6796f274151f802ccdab8756b959b5fb1cb (patch) | |
| tree | a3b95f5bdba66f12c609b5e53b262b011a47a450 /weed/operation/upload_content.go | |
| parent | 4fc0bd1a8173e284ff919edb5214f5adf7a90f06 (diff) | |
| download | seaweedfs-387ab6796f274151f802ccdab8756b959b5fb1cb.tar.xz seaweedfs-387ab6796f274151f802ccdab8756b959b5fb1cb.zip | |
filer: cross cluster synchronization
Diffstat (limited to 'weed/operation/upload_content.go')
| -rw-r--r-- | weed/operation/upload_content.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go index 5c1b946f5..e9002d09d 100644 --- a/weed/operation/upload_content.go +++ b/weed/operation/upload_content.go @@ -11,6 +11,7 @@ import ( "net/http" "net/textproto" "path/filepath" + "runtime/debug" "strings" "time" @@ -85,7 +86,7 @@ func doUpload(uploadUrl string, filename string, cipher bool, reader io.Reader, } func retriedUploadData(uploadUrl string, filename string, cipher bool, data []byte, isInputCompressed bool, mtype string, pairMap map[string]string, jwt security.EncodedJwt) (uploadResult *UploadResult, err error) { - for i := 0; i < 3; i++ { + for i := 0; i < 1; i++ { uploadResult, err = doUploadData(uploadUrl, filename, cipher, data, isInputCompressed, mtype, pairMap, jwt) if err == nil { return @@ -221,8 +222,9 @@ func upload_content(uploadUrl string, fillBufferFunction func(w io.Writer) error } resp, post_err := HttpClient.Do(req) if post_err != nil { - glog.Errorf("upload to %v: %v", uploadUrl, post_err) - return nil, fmt.Errorf("upload to %v: %v", uploadUrl, post_err) + glog.Errorf("upload %s %d bytes to %v: %v", filename, originalDataSize, uploadUrl, post_err) + debug.PrintStack() + return nil, fmt.Errorf("upload %s %d bytes to %v: %v", filename, originalDataSize, uploadUrl, post_err) } defer util.CloseResponse(resp) |
