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

Fix s3 api object list with params max-keys and prefix #4834

Merged
merged 1 commit into from Sep 12, 2023

Conversation

annluda
Copy link
Contributor

@annluda annluda commented Sep 12, 2023

What problem are we solving?

redis as filer store, suppose bucket have objects:

demo_v1
demo_v10
demo_v11
demo_v12
demo_v2
demo_v20

when request s3api list objects with params max-keys and prefix, like http://localhost:8333/test?max-keys=2&prefix=demo_v2, we got 0 result. Because the item's rank in redis is bigger than the max-keys.

How are we solving the problem?

drop isLastItemHasPrefix, compare the prefix and lastFileName directly.

How is the PR tested?

Checks

  • I have added unit tests if possible.
  • I will add related wiki document changes and link to this PR after merging.

@chrislusf chrislusf merged commit 8908810 into seaweedfs:master Sep 12, 2023
5 checks passed
@chrislusf
Copy link
Collaborator

Thanks for the fix! This part of code is tricky. Do you want to add some tests for this?

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.

None yet

2 participants