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

cloud/amazon: add toggle for s3 storage to list prefix with additiona… #85493

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

rhu713
Copy link
Contributor

@rhu713 rhu713 commented Aug 2, 2022

…l marker

Add toggle for s3 storage to list prefixes with a paging marker that's the
prefix with an additional /. This allows certain s3 clones which return
s3://<prefix>/ as the first result of listing s3://<prefix> to exclude that
result.

This behavior is toggled via setting the environment variable
COCKROACH_S3_LIST_WITH_PREFIX_SLASH_MARKER to true.

Release note: None

@rhu713 rhu713 requested review from a team and msbutler August 2, 2022 21:12
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@@ -622,8 +623,15 @@ func (s *s3Storage) List(ctx context.Context, prefix, delim string, fn cloud.Lis
return true
}

var s3Input *s3.ListObjectsInput
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can you copy your comment in the commit into the code as well? It'll be useful to understand why we have this special case whenever someone reads this file

…l marker

Add toggle for s3 storage to list prefixes with a paging marker that's the
prefix with an additional `/`. This allows certain s3 clones which return
`s3://<prefix>/` as the first result of listing `s3://<prefix>` to exclude that
result.

This behavior is toggled via setting the environment variable
`COCKROACH_S3_LIST_WITH_PREFIX_SLASH_MARKER` to true.

Release note: None
@rhu713
Copy link
Contributor Author

rhu713 commented Aug 15, 2022

bors r+

@craig
Copy link
Contributor

craig bot commented Aug 15, 2022

Build succeeded:

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