fix: optimize parentDirIsObject by moving isObject to storage layer (#11291)

For objects with `N` prefix depth, this PR reduces `N` such network
operations by converting `CheckFile` into a single bulk operation.

Reduction in chattiness here would allow disks to be utilized more
cleanly, while maintaining the same functionality along with one
extra volume check stat() call is removed.

Update tests to test multiple sets scenario
This commit is contained in:
Harshavardhana authored and GitHub committed 2021-01-18 12:25:22 -08:00
1 parent 3d9000d5b5
commit 3ca6330661
5 files changed
+84 -104

No files matched your search

+3
View File
@@ -774,6 +774,9 @@ func (s *erasureSets) GetObject(ctx context.Context, bucket, object string, star
}
func (s *erasureSets) parentDirIsObject(ctx context.Context, bucket, parent string) bool {
if parent == "." {
return false
}
return s.getHashedSet(parent).parentDirIsObject(ctx, bucket, parent)
}