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

self heal treesize when listing folders #5105

Open
butonic opened this issue Nov 23, 2022 · 0 comments
Open

self heal treesize when listing folders #5105

butonic opened this issue Nov 23, 2022 · 0 comments
Labels
Category:Enhancement Add new functionality

Comments

@butonic
Copy link
Member

butonic commented Nov 23, 2022

With #5092 we are now propagating a size diff instead of recalculating a directory size. While the propagation code is covered by acceptance tests I think we should implement a form of self healing for the treesize property.

Whenever a directory is listed we can summarize the size of the children and compare that with the parent treesize. If it is different we can log a warning and overwrite the parent treesize with the correct result.

There might be corner cases wher a new file is being written while listing a directory though. we could loose the sizediff when the listing did not contain the new file and its propagation finished before listing the directory is done. we should be able to detect that with an etag comparison befor trying to update the treetime, though. in that case we should probably not log the warning, stay silent and just do nothing.

This would prevent admins from having to manually update the treesize or us writing a cli command for that task.

@butonic butonic added the Category:Enhancement Add new functionality label Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Enhancement Add new functionality
Projects
None yet
Development

No branches or pull requests

1 participant