aboutsummaryrefslogtreecommitdiff
path: root/weed/replication/sink/s3sink/s3_write.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-02-25 22:23:59 -0800
committerChris Lu <chris.lu@gmail.com>2020-02-25 22:23:59 -0800
commit97ab8a1976f3ba056af8d5b630dcb43006425b51 (patch)
treef98588240db017bf7d372b0f216355892cf868e8 /weed/replication/sink/s3sink/s3_write.go
parentca4ca1ae6f87c6fcbf9c486722f36b4f07166187 (diff)
downloadseaweedfs-97ab8a1976f3ba056af8d5b630dcb43006425b51.tar.xz
seaweedfs-97ab8a1976f3ba056af8d5b630dcb43006425b51.zip
remove ctx if possible
Diffstat (limited to 'weed/replication/sink/s3sink/s3_write.go')
-rw-r--r--weed/replication/sink/s3sink/s3_write.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/replication/sink/s3sink/s3_write.go b/weed/replication/sink/s3sink/s3_write.go
index 9386169b8..60885c30c 100644
--- a/weed/replication/sink/s3sink/s3_write.go
+++ b/weed/replication/sink/s3sink/s3_write.go
@@ -103,10 +103,10 @@ func (s3sink *S3Sink) completeMultipartUpload(ctx context.Context, key, uploadId
}
// To upload a part
-func (s3sink *S3Sink) uploadPart(ctx context.Context, key, uploadId string, partId int, chunk *filer2.ChunkView) (*s3.CompletedPart, error) {
+func (s3sink *S3Sink) uploadPart(key, uploadId string, partId int, chunk *filer2.ChunkView) (*s3.CompletedPart, error) {
var readSeeker io.ReadSeeker
- readSeeker, err := s3sink.buildReadSeeker(ctx, chunk)
+ readSeeker, err := s3sink.buildReadSeeker(chunk)
if err != nil {
glog.Errorf("[%s] uploadPart %s %d read: %v", s3sink.bucket, key, partId, err)
return nil, fmt.Errorf("[%s] uploadPart %s %d read: %v", s3sink.bucket, key, partId, err)
@@ -156,7 +156,7 @@ func (s3sink *S3Sink) uploadPartCopy(key, uploadId string, partId int64, copySou
return err
}
-func (s3sink *S3Sink) buildReadSeeker(ctx context.Context, chunk *filer2.ChunkView) (io.ReadSeeker, error) {
+func (s3sink *S3Sink) buildReadSeeker(chunk *filer2.ChunkView) (io.ReadSeeker, error) {
fileUrl, err := s3sink.filerSource.LookupFileId(chunk.FileId)
if err != nil {
return nil, err