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

[BugFix] Minimise mumber of calls to folder create in case of Blob to File Copy #2591

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmd/copyEnumeratorInit.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,12 @@ func NewFolderPropertyOption(fromTo common.FromTo, recursive, stripTopDir bool,
}
}

// In case of a Blob to File Copy, we will go for all folder copy
if fromTo == common.EFromTo.BlobFile() {
Copy link
Member

Choose a reason for hiding this comment

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

I thought we decided to use the mitigation (customer sets include directory flag) and get to this issue in a later release after we have a solid plan?

@seanmcc-msft @vibhansa-msft thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

We can consider this fix for the next release (not for 10.23). Once we have more clarity on the flow, may be we can improvise the fix.

Copy link
Member

Choose a reason for hiding this comment

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

We also need to consider the part where putting such check may take away the capabilities to skip empty folders while copying.

return common.EFolderPropertiesOption.AllFolders(),
"Any empty folders will be processed, because source and destination both support folders"
}

bothFolderAware := (fromTo.AreBothFolderAware() || preservePosixProperties || preservePermissions || includeDirectoryStubs) && !isDstNull
isRemoveFromFolderAware := fromTo == common.EFromTo.FileTrash()
if bothFolderAware || isRemoveFromFolderAware {
Expand Down