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

Allow timingReadCloser to be seeker #94

Merged
merged 1 commit into from
Dec 31, 2023
Merged

Conversation

danielblando
Copy link
Contributor

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

Changes

Cortex uses objstore to update blocks to s3. Cortex had added a retry functionality using seeker objects.
https://github.com/cortexproject/cortex/blob/master/pkg/storage/bucket/s3/bucket_client.go#L176-L191
It checks if an object is seeker and if so it allow it to retry.

It also wrap the bucket store with metrics
https://github.com/cortexproject/cortex/blob/master/pkg/storage/bucket/client.go#L145

With the new timing metrics, ojbstore now override the object and thus change it to always be io.ReadCloser which is what the implementation requires, but it does not allow cortex to retry request anymore.
The change allow it to continue using a seeker object if the original object was seekable.

Verification

Added unit tests to verify the functionality still works.

@danielblando danielblando marked this pull request as ready for review December 29, 2023 03:24
@brancz
Copy link
Member

brancz commented Dec 31, 2023

lgtm, thank you!

@brancz brancz merged commit 61cfed8 into thanos-io:main Dec 31, 2023
@danielblando danielblando deleted the seeker branch January 2, 2024 16:58
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.

2 participants