Skip to content
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

Improve Simulator IO by handing RowResult::IO #348

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

arpit-saxena
Copy link
Contributor

@arpit-saxena arpit-saxena commented Sep 26, 2024

This is not related to any open issue (atleast from the ones I saw). This is related to an issue I saw when running the simulator as it was calling io.run_once() even before submitting any read/write job. This would lead to it hanging since io_uring's submit_and_wait would keep waiting for a completion event.

I've tried to improve the simulator's IO handling a bit:

We inject a fault before calling next_row() through which we'll get pread faults. Also we call io's run_once on getting RowResult::IO. This is run with a fault probability of 1%. This is less because a fault here would result us in terminating the entire loop iterating on rows, and also because realistically we'll expect less faults here.

PS: I think run_once() should not hang either when no operation is pending in io_uring. Opened #349 for fixing that.

We inject fault before calling next_row() through which we'll get pread
faults. Also we call io's run_once on getting RowResult::IO. This is run
with a fault probability of 1%. This is less because a fault here would
result us in terminating the entire loop iterating on rows, and also
because realistically we'll expect less faults here
@penberg penberg merged commit 34e6973 into tursodatabase:main Sep 26, 2024
30 checks passed
@arpit-saxena arpit-saxena deleted the fix_simulator_io branch September 27, 2024 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants