Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multipart features #1358

Merged
merged 6 commits into from
Jul 30, 2019
Merged

Multipart features #1358

merged 6 commits into from
Jul 30, 2019

Conversation

deejay1
Copy link
Contributor

@deejay1 deejay1 commented Jul 29, 2019

Some S3 compatible setups may have a different limit for maximum
file size in multipart uploads, so allow for overriding it.

Signed-off-by: Lukasz Jernas lukasz.jernas@allegro.pl

  • [ENHANCEMENT] Allow for setting minimal part size for S3 multipart uploads

Changes

Added part_size parameter to S3 YAML config file in bytes to allow for setting different multipart part size for chunk upload.

Verification

Added a config test and tested in a real world scenario.

Some S3 compatible setups may have a different limit for maximum
file size in multipart uploads, so allow for overriding it.

Signed-off-by: Lukasz Jernas <lukasz.jernas@allegro.pl>
Signed-off-by: Lukasz Jernas <lukasz.jernas@allegro.pl>
Signed-off-by: Lukasz Jernas <lukasz.jernas@allegro.pl>
Signed-off-by: Lukasz Jernas <lukasz.jernas@allegro.pl>
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thank you.

Small suggestions and LGTM!

pkg/objstore/s3/s3.go Outdated Show resolved Hide resolved

// Use the default minio minPartSize if not set
if config.PartSize == 0 {
config.PartSize = 1024 * 1024 * 128
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

putting this 1024 * 1024 * 128 in some meaningfully named constant would be nice for a reader.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hope it's better now, although I couldn't really find a meaningful variable name which wouldn't require an explanation anyway.

Extract calculation to a constant and fixup comments.
pkg/objstore/s3/s3.go Outdated Show resolved Hide resolved
pkg/objstore/s3/s3.go Outdated Show resolved Hide resolved
Signed-off-by: Lukasz Jernas <lukasz.jernas@allegro.pl>
@FUSAKLA
Copy link
Member

FUSAKLA commented Jul 29, 2019

Great, thanks for this! We actually lately hit scenario where we need this feature 👍

@FUSAKLA
Copy link
Member

FUSAKLA commented Jul 29, 2019

maybe worth to add to the changelog?

Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well tested and makes sense, LGTM!

@GiedriusS GiedriusS merged commit e0571db into thanos-io:master Jul 30, 2019
paulfantom added a commit to paulfantom/thanos that referenced this pull request Aug 7, 2019
* master:
  iter.go: error message typo correction (thanos-io#1376)
  Fix usage of $GOPATH in Makefile (thanos-io#1379)
  Moved Prometheus 2.11.1 and TSDB to 0.9.1 (thanos-io#1380)
  Store latest config hash and timestamp as metrics (thanos-io#1378)
  pkg/receive/handler.go: log errors (thanos-io#1372)
  receive: Hash-ring metrics (thanos-io#1363)
  receiver: avoid race of hashring (thanos-io#1371)
  feat compact: added readiness Prober (thanos-io#1297)
  Add changelog entry for S3 option (thanos-io#1361)
  Multipart features (thanos-io#1358)
  Added katacoda.yaml (thanos-io#1359)
  Remove deprecated option from example (thanos-io#1351)
  Move suggestion about admin API to appropriate place (thanos-io#1355)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants