|
|
@ -94,12 +94,13 @@ func (s3sink *S3Sink) completeMultipartUpload(ctx context.Context, key, uploadId |
|
|
|
|
|
|
|
result, err := s3sink.conn.CompleteMultipartUpload(input) |
|
|
|
if err == nil { |
|
|
|
glog.V(0).Infof("[%s] completeMultipartUpload %s: %v", s3sink.bucket, key, result) |
|
|
|
glog.V(1).Infof("[%s] completeMultipartUpload %s: %v", s3sink.bucket, key, result) |
|
|
|
} else { |
|
|
|
glog.Errorf("[%s] completeMultipartUpload %s: %v", s3sink.bucket, key, err) |
|
|
|
return fmt.Errorf("[%s] completeMultipartUpload %s: %v", s3sink.bucket, key, err) |
|
|
|
} |
|
|
|
|
|
|
|
return err |
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
// To upload a part
|
|
|
@ -163,7 +164,7 @@ func (s3sink *S3Sink) buildReadSeeker(chunk *filer.ChunkView) (io.ReadSeeker, er |
|
|
|
} |
|
|
|
buf := make([]byte, chunk.Size) |
|
|
|
for _, fileUrl := range fileUrls { |
|
|
|
_, err = util.ReadUrl(fileUrl+"?readDeleted=true", nil, false, false, chunk.Offset, int(chunk.Size), buf) |
|
|
|
_, err = util.ReadUrl(fileUrl, chunk.CipherKey, chunk.IsGzipped, false, chunk.Offset, int(chunk.Size), buf) |
|
|
|
if err != nil { |
|
|
|
glog.V(1).Infof("read from %s: %v", fileUrl, err) |
|
|
|
} else { |
|
|
|