-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
deps/objstore: upgrade to minio-go/v7 #2970
Conversation
Signed-off-by: Alexander Hellbom <alexander.hellbom@gmail.com>
Signed-off-by: Alexander Hellbom <alexander.hellbom@gmail.com>
Signed-off-by: Alexander Hellbom <alexander.hellbom@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very solid, thanks. Only one nit, but so small I will just merge, let's fix next time. 💪
It looks like the 100th contribution not first!
I really tried to find any suggestion to make, but could not ;p
}).DialContext, | ||
|
||
MaxIdleConns: 100, | ||
MaxIdleConnsPerHost: 100, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -228,7 +233,12 @@ func (b *Bucket) Iter(ctx context.Context, dir string, f func(string) error) err | |||
dir = strings.TrimSuffix(dir, DirDelim) + DirDelim | |||
} | |||
|
|||
for object := range b.client.ListObjects(b.name, dir, false, ctx.Done()) { | |||
opts := minio.ListObjectsOptions{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used once, so we can inline (:
See: https://thanos.io/contributing/coding-style-guide.md/#avoid-defining-variables-used-only-once
@@ -314,7 +324,7 @@ func (b *Bucket) Upload(ctx context.Context, name string, r io.Reader) error { | |||
if size < int64(partSize) { | |||
partSize = 0 | |||
} | |||
if _, err := b.client.PutObjectWithContext( | |||
if _, err := b.client.PutObject( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow (: They did this finally
Changes
First time contributor so might need some handholding here :)
Upgraded from minio-go/v6 to minio-go/v7 and adjusted a couple functions to resolve the following issue: #2097
Example timings before (compactor):
Example timings after (compactor):
Fixes: #2097
Related: minio/minio-go#1321
Verification
Existing tests and from actual usage.
Happy to provide more information and/or add tests if necessary :)