-
Notifications
You must be signed in to change notification settings - Fork 0
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
Size tracking component #423
base: main
Are you sure you want to change the base?
Conversation
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.
That's quite the testing infrastructure! Good work!
} | ||
|
||
var newSize int64 | ||
attr, getAttrErr2 := st.NextComponent().GetAttr(internal.GetAttrOptions{Name: options.Handle.Path}) |
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.
Could we use the WriteFileOptions
to figure out the new size without calling GetAttr again?
I think the new size would be whichever is larger: the old size or options.Offset + len(options.Data)
, right?
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.
Yeah, good idea to avoid an extra call. I will make that change.
Co-authored-by: Michael Habinsky <foodprocessor@users.noreply.github.com> Signed-off-by: James Fantin-Hardesty <24646452+jfantinhardesty@users.noreply.github.com>
…e into size-tracking-component
What type of Pull Request is this? (check all applicable)
Describe your changes in brief
This adds a new size tracker component which tracks the size of the mounted directory to prevent calls to the cloud to get the size of the mount. This in particular is useful when mounting subdirectories as there is no call in S3 to retrieve the size of the storage. This component goes in between the file_cache and attr_cache to track write information.
Checklist
Related Issues