Skip to content

Commit

Permalink
fixup! s3store: Parallelize part uploads and information retrieval (#478
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Acconut committed May 23, 2021
1 parent 578731a commit ce54ff8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions cmd/tusd/cli/composer.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ func CreateComposer() {
}

if Flags.S3Endpoint == "" {

if Flags.S3TransferAcceleration {
stdout.Printf("Using 's3://%s' as S3 bucket for storage with AWS S3 Transfer Acceleration enabled.\n", Flags.S3Bucket)
} else {
stdout.Printf("Using 's3://%s' as S3 bucket for storage.\n", Flags.S3Bucket)
}

} else {
stdout.Printf("Using '%s/%s' as S3 endpoint and bucket for storage.\n", Flags.S3Endpoint, Flags.S3Bucket)

Expand All @@ -61,6 +59,7 @@ func CreateComposer() {
store.ObjectPrefix = Flags.S3ObjectPrefix
store.PreferredPartSize = Flags.S3PartSize
store.DisableContentHashes = Flags.S3DisableContentHashes
store.SetConcurrentPartUploads(Flags.S3ConcurrentPartUploads)
store.UseIn(Composer)

locker := memorylocker.New()
Expand Down
4 changes: 2 additions & 2 deletions pkg/s3store/s3store.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ func New(bucket string, service S3API) S3Store {
}
}

// S3ConcurrentPartUploads changes the limit on how many concurrent part uploads to S3 are allowed.
func (store *S3Store) S3ConcurrentPartUploads(limit int) {
// SetConcurrentPartUploads changes the limit on how many concurrent part uploads to S3 are allowed.
func (store *S3Store) SetConcurrentPartUploads(limit int) {
store.uploadSemaphore = semaphore.New(limit)
}

Expand Down

0 comments on commit ce54ff8

Please sign in to comment.