diff options
| author | Chris Lu <chris.lu@gmail.com> | 2013-11-18 23:03:06 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2013-11-18 23:03:06 -0800 |
| commit | c4a4d3609bf07f0c84ce94dc2566984825862de7 (patch) | |
| tree | 5d43040421f2c8a98d42d0b4931b59c6beb22a1c /go | |
| parent | 0e5e0a375493a3186ecbac89e13df4cbe8bc917f (diff) | |
| download | seaweedfs-c4a4d3609bf07f0c84ce94dc2566984825862de7.tar.xz seaweedfs-c4a4d3609bf07f0c84ce94dc2566984825862de7.zip | |
fix duplicated file id list entries when uploading large file
Diffstat (limited to 'go')
| -rw-r--r-- | go/operation/submit.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/go/operation/submit.go b/go/operation/submit.go index e922a8834..3c7d233ad 100644 --- a/go/operation/submit.go +++ b/go/operation/submit.go @@ -112,11 +112,8 @@ func (fi FilePart) upload(server string, fid string, maxMB int, master, replicat } fids = append(fids, id) retSize += count - if e = upload_file_id_list(fileUrl, fi.FileName+"-list", fids); e != nil { - return 0, e - } } - return retSize, nil + err = upload_file_id_list(fileUrl, fi.FileName+"-list", fids) } else { ret, e := Upload(fileUrl, fi.FileName, fi.Reader, fi.IsGzipped, fi.MimeType) if e != nil { @@ -124,7 +121,7 @@ func (fi FilePart) upload(server string, fid string, maxMB int, master, replicat } return ret.Size, e } - return 0, nil + return } func upload_one_chunk(filename string, reader io.Reader, master, replication string) (fid string, size int, e error) { |
