-
Notifications
You must be signed in to change notification settings - Fork 223
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 making too many create directory call #2828
Conversation
@gapra-msft @adreed-msft |
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.
A couple concerns I thought of...
- This only affects folders we're directly tracking to transfer properties. What about those that we're not?
- The mention of the use of a Trie instead of a hashmap on Vikas' comment
- What about when we're not trying to persist directories at all? e.g. blob->file. We need to carefully track the existing directory structure for a valid implementation of this.
…com/Azure/azure-storage-azcopy into dphulkar/fixCreatingTooManyDirCalls
…com/Azure/azure-storage-azcopy into dphulkar/fixCreatingTooManyDirCalls
…into dphulkar/fixCreatingTooManyDirCalls
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.
Apologies for the wall of text, I was reading the code and just more things kept popping into my head.
This reverts commit b462994.
Issue:
In the folderCreationTracker.go file, we addressed an issue where multiple createDirectory REST calls were being sent for the same folder during the copy operation, particularly with deeply nested directory structures. This was caused by the StopTracking() function prematurely removing folder entries from the contents map, leading to redundant createDirectory requests.
Fix:
To resolve this issue while maintaining memory optimization (which was the original reason for removing entries), we have replaced the contents map with a trie data structure. The trie allows us to efficiently track folder creation and ensures that redundant requests are avoided, while also optimizing memory usage.