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

remote_storage: fix prefix handling in remote storage & clean up #7431

Merged
merged 7 commits into from
Apr 23, 2024

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Apr 18, 2024

Problem

Split off from #7399, which is the first piece of code that does a WithDelimiter object listing using a prefix that isn't a full directory name.

Summary of changes

  • Revise list function to not append a / to the prefix -- prefixes don't have to end with a slash.
  • Fix local_fs implementation of list to not assume that WithDelimiter case will always use a directory as a prerfix.
  • Remove list_files, list_prefixes wrappers, as they add little value and obscure the underlying list function -- we need callers to understand the semantics of what they're really calling (listobjectsv2)

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

@jcsp jcsp added t/bug Issue Type: Bug c/storage/pageserver Component: storage: pageserver labels Apr 18, 2024
Copy link

github-actions bot commented Apr 18, 2024

2766 tests run: 2645 passed, 0 failed, 121 skipped (full report)


Code coverage* (full report)

  • functions: 28.1% (6467 of 23021 functions)
  • lines: 46.9% (45895 of 97805 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
1746009 at 2024-04-23T14:19:35.778Z :recycle:

@jcsp jcsp force-pushed the jcsp/remote-storage-listing branch from 9c1c804 to 658d154 Compare April 18, 2024 19:28
@jcsp jcsp mentioned this pull request Apr 18, 2024
5 tasks
@jcsp jcsp force-pushed the jcsp/remote-storage-listing branch from 658d154 to f9aff6f Compare April 18, 2024 19:47
@jcsp jcsp force-pushed the jcsp/remote-storage-listing branch from f9aff6f to d641823 Compare April 19, 2024 07:36
@jcsp jcsp marked this pull request as ready for review April 19, 2024 11:56
@jcsp jcsp requested review from a team as code owners April 19, 2024 11:56
Copy link
Contributor

@VladLazar VladLazar left a comment

Choose a reason for hiding this comment

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

Nice cleanup! Looks good to me, although I'm not super familiar with this code area

libs/remote_storage/src/s3_bucket.rs Outdated Show resolved Hide resolved
@jcsp jcsp enabled auto-merge (squash) April 23, 2024 13:35
@jcsp jcsp merged commit e22c072 into main Apr 23, 2024
53 checks passed
@jcsp jcsp deleted the jcsp/remote-storage-listing branch April 23, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/storage/pageserver Component: storage: pageserver t/bug Issue Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants