-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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: all levels deep flat key match #12996
Conversation
6de0bc0
to
91b45e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@klauspost PTAL
if len(prefix) > 0 && !strings.HasPrefix(entry, prefix) { | ||
// Do do not retain the file, since it doesn't | ||
// match the prefix. | ||
entries[i] = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This felt to be right since we do not need to stack this up again in dirStack() as we do not need to go further down if there is no prefix match
if len(forward) > 0 && entry < forward { | ||
// Do do not retain the file, since it doesn't | ||
// is lexically smaller than 'forward' | ||
entries[i] = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This felt to be right since we do not need to stack this up again in dirStack() as we do not need to go further down if lexically smaller than forward
this addresses a regression from minio#12984 which only addresses flat key from single level deep at bucket level. added extra tests as well to cover all these scenarios.
91b45e2
to
0670ba2
Compare
Mint Automation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
this addresses a regression from #12984 which only addresses flat key from single level deep at bucket level. added extra tests as well to cover all these scenarios.
this addresses a regression from #12984 which only addresses flat key from single level deep at bucket level. added extra tests as well to cover all these scenarios.
this addresses a regression from minio#12984 which only addresses flat key from single level deep at bucket level. added extra tests as well to cover all these scenarios. # Conflicts: # cmd/metacache-walk.go
this addresses a regression from minio#12984 which only addresses flat key from single level deep at bucket level. added extra tests as well to cover all these scenarios. --- Additionally had to update prefix handling in fs-v1-storage.go in order to make the new test cases run in nas mode. Prefix-check in fsStorage.WalkDir is now identical to xlStorage.WalkDir.
this addresses a regression from minio#12984 which only addresses flat key from single level deep at bucket level. added extra tests as well to cover all these scenarios. --- Additionally had to update prefix handling in fs-v1-storage.go in order to make the new test cases run in nas mode. Prefix-check in fsStorage.WalkDir is now identical to xlStorage.WalkDir.
this addresses a regression from minio#12984 which only addresses flat key from single level deep at bucket level. added extra tests as well to cover all these scenarios. --- Additionally had to update prefix handling in fs-v1-storage.go in order to make the new test cases run in nas mode. Prefix-check in fsStorage.WalkDir is now identical to xlStorage.WalkDir.
this addresses a regression from minio#12984 which only addresses flat key from single level deep at bucket level. added extra tests as well to cover all these scenarios. --- Additionally had to update prefix handling in fs-v1-storage.go in order to make the new test cases run in nas mode. Prefix-check in fsStorage.WalkDir is now identical to xlStorage.WalkDir.
this addresses a regression from minio#12984 which only addresses flat key from single level deep at bucket level. added extra tests as well to cover all these scenarios. --- Additionally had to update prefix handling in fs-v1-storage.go in order to make the new test cases run in nas mode. Prefix-check in fsStorage.WalkDir is now identical to xlStorage.WalkDir.
this addresses a regression from minio#12984 which only addresses flat key from single level deep at bucket level. added extra tests as well to cover all these scenarios. --- Additionally had to update prefix handling in fs-v1-storage.go in order to make the new test cases run in nas mode. Prefix-check in fsStorage.WalkDir is now identical to xlStorage.WalkDir.
this addresses a regression from minio#12984 which only addresses flat key from single level deep at bucket level. added extra tests as well to cover all these scenarios. --- Additionally had to update prefix handling in fs-v1-storage.go in order to make the new test cases run in nas mode. Prefix-check in fsStorage.WalkDir is now identical to xlStorage.WalkDir.
this addresses a regression from minio#12984 which only addresses flat key from single level deep at bucket level. added extra tests as well to cover all these scenarios. --- Additionally had to update prefix handling in fs-v1-storage.go in order to make the new test cases run in nas mode. Prefix-check in fsStorage.WalkDir is now identical to xlStorage.WalkDir.
Description
fix: all levels deep flat key match
Motivation and Context
this addresses a regression from #12984
which only addresses flat keys from single
level deep at the bucket level.
added extra tests as well to cover all
these scenarios.
How to test this PR?
Create the following hierarchy
Then attempt to list with flat key match
Types of changes
Checklist: