mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Concurrency works better (#4663)
Co-authored-by: mervyn.zhang <mervyn.zhang@sap.com>
This commit is contained in:
parent
0cb9ddd8ec
commit
df400e6c71
|
@ -2,6 +2,9 @@ package s3
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"reflect"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/aws/credentials"
|
"github.com/aws/aws-sdk-go/aws/credentials"
|
||||||
"github.com/aws/aws-sdk-go/aws/request"
|
"github.com/aws/aws-sdk-go/aws/request"
|
||||||
|
@ -15,8 +18,6 @@ import (
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb/remote_pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb/remote_pb"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/remote_storage"
|
"github.com/seaweedfs/seaweedfs/weed/remote_storage"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/util"
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||||
"io"
|
|
||||||
"reflect"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -155,7 +156,7 @@ func (s *s3RemoteStorageClient) WriteFile(loc *remote_pb.RemoteStorageLocation,
|
||||||
// Create an uploader with the session and custom options
|
// Create an uploader with the session and custom options
|
||||||
uploader := s3manager.NewUploaderWithClient(s.conn, func(u *s3manager.Uploader) {
|
uploader := s3manager.NewUploaderWithClient(s.conn, func(u *s3manager.Uploader) {
|
||||||
u.PartSize = partSize
|
u.PartSize = partSize
|
||||||
u.Concurrency = 8
|
u.Concurrency = 1
|
||||||
})
|
})
|
||||||
|
|
||||||
// process tagging
|
// process tagging
|
||||||
|
|
Loading…
Reference in a new issue