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

filesystem: abort filesystem bucket operations if the context has been cancelled #43

Merged

Conversation

charleskorn
Copy link
Contributor

@charleskorn charleskorn commented Jan 27, 2023

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

Changes

Changed all of the filesystem.Bucket methods to return early if the context has been cancelled.

This makes testing cancellation behaviour of consuming applications easier (see grafana/mimir#4061 for an example), and brings the behaviour of the filesystem bucket into line with the other providers.

Verification

I've added tests for cancellation behaviour in filesystem_test.go, and the existing acceptance tests should catch any regressions in existing behaviour.

Signed-off-by: Charles Korn <charles.korn@grafana.com>
Signed-off-by: Charles Korn <charles.korn@grafana.com>
charleskorn and others added 2 commits January 30, 2023 09:17
Signed-off-by: Charles Korn <charles.korn@grafana.com>
Signed-off-by: Charles Korn <charleskorn@users.noreply.github.com>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

FWIW, LGTM :)

Copy link
Contributor

@douglascamata douglascamata 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
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

Thanks!

@yeya24 yeya24 merged commit 11ffbc4 into thanos-io:main Feb 1, 2023
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