-
Notifications
You must be signed in to change notification settings - Fork 157
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
Implement retry in readonly open #2122
Comments
Correct me if i am wrong irmin/src/irmin-pack/unix/file_manager.ml Lines 733 to 750 in 649657d
|
@kayceesrk I am not sure whom to ping for this :(. Pinging you for help |
I see |
@Athishpranav2003 > Indeed you found the right function to fix! Since the issue was written, we can now distinguish between a Thanks for looking into this, let me know if you have any questions! |
so @art-w can we map the |
Yes so any |
@art-w so i was thinking about performing this. let try_finalize f x finally y =
let res = try f x with exn -> finally y; raise exn in
finally y;
res Do u have any suggestions? |
That makes sense, but you might want to check a tutorial on Lwt, which is the scheduler used by every Since the bug is almost impossible to replicate, it could help if you start by writing a unit test that creates a new irmin-pack repo, add a few things, and then remove one of the internal irmin files before trying to reopen the store. This should trigger the |
Hmm ok Will try the same, Seems like small but tricky thing. i have some problem with type hinting so will resolve it to start with |
Since #2119 we are able to detect if a control file is being read with a data race. These data races can be solved by sleeping and retrying. We are however not capable of distinguishing between data races and corrupted control files, this implies that the number of retry should be bounded to fallback on a
Corrupted_control_file
error.Also, since the GC finalisation deletes old files, a data race is possible if a RO instance stalls between the read the control file and the opening of the files. The data race would materialise as a
No_such_file_or_directory
error.Both these data races could be fixed at once by implementing a retry in the file manager.
The text was updated successfully, but these errors were encountered: