trigger a rescan when trying to fopen a file that exists in cache but not on disk#33566
Merged
trigger a rescan when trying to fopen a file that exists in cache but not on disk#33566
Conversation
c2709f3 to
e64159c
Compare
Member
|
I am facing this on a weekly basis with my dev instance where the data folder get reset frequently! Thanks for diving into this! |
PVince81
reviewed
Sep 21, 2022
PVince81
reviewed
Sep 21, 2022
PVince81
reviewed
Sep 21, 2022
PVince81
reviewed
Sep 21, 2022
Member
PVince81
left a comment
There was a problem hiding this comment.
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
come-nc
approved these changes
Sep 29, 2022
Member
Author
|
/backport to stable25 |
Member
Author
|
/backport to stable24 |
Member
Author
|
/backport to stable23 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_existswill check the cache.