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
Support for "directory" objects #10499
Support for "directory" objects #10499
Conversation
5405304
to
30a6388
Compare
@@ -57,6 +57,9 @@ func filterMatchingPrefix(entries []string, prefixEntry string) []string { | |||
// isLeaf should be done in listDir() | |||
func delayIsLeafCheck(entries []string) bool { | |||
for i, entry := range entries { | |||
if HasSuffix(entry, globalDirSuffixWithSlash) { |
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.
Add a comment on why its skipped?
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.
Please add comments in this portion of the code @krishnasrinivas
@@ -96,7 +99,20 @@ func filterListEntries(bucket, prefixDir string, entries []string, prefixEntry s | |||
entries = filterMatchingPrefix(entries, prefixEntry) | |||
|
|||
// Listing needs to be sorted. | |||
sort.Strings(entries) | |||
sort.Slice(entries, func(i, j int) bool { | |||
if !HasSuffix(entries[i], globalDirSuffixWithSlash) && !HasSuffix(entries[j], globalDirSuffixWithSlash) { |
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.
Add a comment on how this handles the order for __MINIO__DIR_
Found that on versioning enabled buckets we end up creating versions for empty directories we need to fix that @krishnasrinivas
|
|
I am not sure if this was intentional @krishnasrinivas |
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.
...edited...
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
152e5cb
to
9778539
Compare
@@ -57,6 +57,9 @@ func filterMatchingPrefix(entries []string, prefixEntry string) []string { | |||
// isLeaf should be done in listDir() | |||
func delayIsLeafCheck(entries []string) bool { | |||
for i, entry := range entries { | |||
if HasSuffix(entry, globalDirSuffixWithSlash) { |
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.
Please add comments in this portion of the code @krishnasrinivas
@krishnasrinivas the tests don't pass yet can you fix them? Also, I did my Hadoop tests the migration jobs seem to run fine from hadoop to MinIO without much trouble. |
3be248e
to
6c421c2
Compare
Mint Automation
10499-6c421c2/mint-gateway-azure.sh.log:
Deleting image on docker hub |
Description
This is a requirement from a potential customer:
Without the fix:
i.e "prefix/" is gone.
With fix, "prefix/" is not deleted:
Request to reviewers: Please see if this causes any side effects to healing of the "prefix/' object.
Types of changes
Checklist:
commit-id
orPR #
here)