-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
add command to repair broken filesystem trees #25189
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
Conversation
a70ce55 to
cf26569
Compare
rullzer
left a comment
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.
Makes sense
But I didn't test it. Is there an easy way to test it?
|
you can manually break your filesystem tree by changing the |
9884fc2 to
ef9f205
Compare
nickvergessen
left a comment
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.
Looks good
Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
…y been recreated Signed-off-by: Robin Appelman <[email protected]>
ChristophWurst
left a comment
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.
Code makes sense as far as I understand the file cache
👍 (🐘)
Signed-off-by: Robin Appelman <[email protected]>
ef9f205 to
1ecc029
Compare
|
would be good to have unit tests to confirm that this isn't causing any side effects something like https://github.com/owncloud/core/pull/28253/files#diff-61c2bd81935832b24f87e329f7b6374aa736b3d7c74196581abe0892d983303e |
|
/backport to stable20 |
|
/backport to stable19 |
If for any reason the path of an entry in the filecache doesn't match with it's expected path based on the path of it's parent node you end up with an entry in the filecache that exists in different places based on how the entry is generated. For example, while listing folder
/foois contains a filebar.txt, but when trying to do anything with/foo/bar.txtthe file doesn't exists.This command attempts to repair such entries by querying for entries there the path doesn't match the expected path based on it's parent path and filename and resets it's path to the expected one.
It is not guaranteed that the "new" path is the correct one, but while that would leave the filecache and actual filesystem out of sync, various automated and manual processes to fix that already exist as filecache synchronization is a much wider topic.
By comparison there isn't currently any way (short of manual database editing) to repair a broken file tree.