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

Replace BucketReader.ObjectSize() with .Attributes() #2613

Merged

Conversation

pracucci
Copy link
Contributor

@pracucci pracucci commented May 15, 2020

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

As first step to address #2585, in this PR I've replaced BucketReader.ObjectSize() with Attributes() in order to also be able to read the object last modified timestamp via the BucketReader.

/cc @pstibrany

Verification

Unit tests.

Copy link
Member

@povilasv povilasv left a comment

Choose a reason for hiding this comment

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

👍

pkg/store/cache/caching_bucket.go Outdated Show resolved Hide resolved
Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

Amazing! Tiny comments only and LGTM (: 💪

pkg/objstore/clientutil/parse.go Outdated Show resolved Hide resolved
pkg/objstore/clientutil/parse.go Outdated Show resolved Hide resolved
pkg/objstore/clientutil/parse.go Show resolved Hide resolved
pkg/objstore/inmem.go Show resolved Hide resolved
pkg/objstore/objstore.go Show resolved Hide resolved
pkg/objstore/inmem.go Show resolved Hide resolved
pkg/block/indexheader/binary_reader.go Show resolved Hide resolved
docs/components/store.md Outdated Show resolved Hide resolved
pkg/objstore/inmem.go Show resolved Hide resolved
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.

Looks good modulo the current comments/suggestions

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
@pracucci pracucci force-pushed the add-attributes-to-objstore-clients branch from c95fd62 to 001bbf7 Compare May 21, 2020 07:54
@pracucci pracucci merged commit 48c80d1 into thanos-io:master May 21, 2020
@pracucci pracucci deleted the add-attributes-to-objstore-clients branch May 21, 2020 08:38
@pstibrany
Copy link
Contributor

pstibrany commented Jun 30, 2020

This PR has changed chunk_object_size_ttl (Thanos 0.13) to chunk_object_attrs_ttl (on master) in cache config, which is a user-visible change, not mentioned in the changelog.

@pracucci
Copy link
Contributor Author

This PR has changed chunk_object_size_ttl (Thanos 0.13) to chunk_object_attrs_ttl (on master) in cache config, which is a user-visible change, not mentioned in the changelog.

Thanks for the heads up. I'm going to open a PR to fix it.

@SabaPing
Copy link
Contributor

SabaPing commented Jul 21, 2020

The method clientutil.ParseLastModified failed when called by oss.Attributes.

Aliyun oss api returns Last-Modified header in RFC1123 format. But the method clientutil.ParseLastModified parses all timestamp in RFC3339 format.

See oss api doc
image

This bug cause the store fails to load buckets from aliyun oss.

Could I submit a PR to fix this?

Thanks.

@bwplotka
Copy link
Member

Yes please @SabaPing ❤️

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.

6 participants