-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Add GetTemperature on existing files #9498
Conversation
Summary: For tiered storage Test Plan: Just API placeholders for now
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.
It feels like a good function call for validation purpose regardless whether we build tiered storage migration using it.
@pdillinger has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
I'm thinking about revising or extending this. We probably want to be able to find out the tier without opening the file, or at least have that option. We have some options:
And if we have these, do we need the versions that tell you about an open file?
|
I was going to suggest adding a FileSystem::GetFileAttributes() method that returns the attributes of a file (size, modification time, temperature). Currently, you can only get the attributes of all files in a directory. I think this makes more sense than being able to get the Temperature from the various FSxxFile classes. |
I'm not ruling out adding more ways to access the info in the future, but I think these functions are useful because they should suffice for our near-term needs and likely be simplest to implement within the FileSystem. And longer term (as mentioned above) GetTemperature() on an open file is likely more efficient if opening the file anyway, because it can avoid a second seek to the file by name, or potentially a directory listing. |
Summary: For tiered storage
Test Plan: Just API placeholders for now