-
Notifications
You must be signed in to change notification settings - Fork 21
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
recover datastore on corruption #15
Conversation
(but not if we're opening it read-only) fixes ipfs/kubo#4981
I wonder if it would be best to just warn and have recovery as a non-automatic function. However, if there's no drawbacks in automatically recovering, then maybe it would be better to just do it implicitly when corruption is detected. |
I think the reason this recovery function is separate is so that one can warn the user that we're recovering (may take some time). We could just suggest OT: Given your lockfile fixes, we can probably remove |
Agreed, sounds good to me. The only thing on my mind was convention, but I didn't stop to think if it was a good convention. I can't think of a situation where you would not want to recover corrupted data, but users should be aware of the fact, corrupt data was detected.
I believe so. If all platforms store lock files in a temporary manner (like in memory), there shouldn't be a scenario where it exists already, without an instance running. However, it doesn't hurt to keep it for portability's sake. Without it, we would have to test |
I would say only if the recovery is 100% safe and won't lead to data loss. If the damage is extensive and some data can't be recovered than it should abort and let the user deal with the situation manually. |
@kevina I would hope the recovery is safe. It looks like it just deletes and rebuilds the manifest. |
Than that should be okay. I agree that we should automatically recover from stall lockfiles. My main concern is when the recovery process can make things worst, a good example is a filesystem |
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.
This seams simple and safe enough.
(but not if we're opening it read-only)
fixes ipfs/kubo#4981