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

Reduce the number of rest calls while doing Rename Operation #1614

Merged
merged 10 commits into from
Jan 31, 2025

Conversation

syeleti-msft
Copy link
Member

@syeleti-msft syeleti-msft commented Jan 20, 2025

✅ What

Currently we invalidate the cache item of destination (to remove the older reference of detination in our cache) after the rename operation completes[, this can be identified in the final call of the following flow:
Rename on FNS:
API calls: There are 5 REST api calls assosiated with this operation.

  1. GetAttr(src)---------list call (filesystem call)
  2. GetAttr(dst)---------list call (filesystem call)
  3. copyblob(src->dst)----------(rename function)
  4. deleteblob(src)--------------(rename function)
  5. GetAttr(dst)---------list call (filesystem call)

Rename on HNS:
API Calls: There are 4 REST api calls assosiated with this operation.

  1. GetAttr(Dst)
  2. GetAttr(Src)
  3. RenamePathFile
  4. GetAttr(dst)

goal is to serve the last call(invalidatePath) for FNS&HNS in the above REST calls from the attribute cache.

🤔 Why

The idea is to simply copy source Attributes in the destination file object when the rename is success.
The only thing that modified in the destination was the last modified time, it will be modified according to the response of REST call for rename in AzStorage Component.

👩‍🔬 How to validate if applicable

Do rename operation with "mv" and see that the Final GetAttr on Dst after rename is success will be served from the cache.

component/azstorage/block_blob.go Show resolved Hide resolved
component/azstorage/block_blob.go Outdated Show resolved Hide resolved
component/azstorage/block_blob.go Show resolved Hide resolved
@syeleti-msft syeleti-msft merged commit 70890da into blobfuse/2.4.1 Jan 31, 2025
8 checks passed
@syeleti-msft syeleti-msft deleted the syeleti/rename branch January 31, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants