-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
trigger a rescan when trying to fopen a file that exists in cache but not on disk #33566
Conversation
c2709f3
to
e64159c
Compare
I am facing this on a weekly basis with my dev instance where the data folder get reset frequently! Thanks for diving into this! |
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.
see code comments
otherwise the approach looks ok
Signed-off-by: Robin Appelman <robin@icewind.nl>
71d33d9
to
e32def0
Compare
… not on disk Signed-off-by: Robin Appelman <robin@icewind.nl>
e32def0
to
cb51564
Compare
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.
👍
/backport to stable25 |
/backport to stable24 |
/backport to stable23 |
When the file index gets out of sync, any attempt by client to open a deleted (but still in cache) file will result in errors until an admin manually triggers a scan to repair it.
Rather than letting clients loop in errors forever we can just detect this error condition and repair the file index ourselves.
Note that this has no effect on primary object store as there
file_exists
will check the cache.