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

GCS: use Query.SetAttrSelection when listing objects #76

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

andyasp
Copy link
Contributor

@andyasp andyasp commented Sep 12, 2023

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

Changes

Uses Query.SetAttrSelection to only populate the Name field in Iter for GCS since it's the only object field used. It is suggested in the documentation near the bottom of this section. In case it confuses anyone else besides me Prefix isn't an option available to set (reference) and isn't affected.

Verification

Locally performed recursive and non-recursive listings both with this change and without against a development bucket. The listing results were identical. I did not attempt to measure a performance impact myself.

@andyasp andyasp marked this pull request as ready for review September 12, 2023 20:16
@fpetkovski
Copy link
Contributor

Oh, I wonder if this can help with thanos-io/thanos#6707.

@fpetkovski
Copy link
Contributor

Let me test this out on a large bucket and we should be good to merge.

@fpetkovski fpetkovski merged commit eb06103 into thanos-io:main Sep 13, 2023
@andyasp andyasp deleted the aasp/gcs-set-attrs branch September 13, 2023 13:54
@MichaHoffmann
Copy link
Contributor

🎉 thanks!

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.

3 participants