-
Notifications
You must be signed in to change notification settings - Fork 144
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
multistatement queries enter infinite busy loop upon network error #306
Comments
Thanks for report. I'll look into it as soon as possible. |
hey @blackbeam, thanks for response. this hacky attempt: fulara@67747ad |
@fulara, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have encountered an issue with multi statement queries.
In my case those queries have multiple inserts to a different tables formatted and send as a string request to database.
If during the execution of the multistatment query a network failure happens, such as target endpoint going down, all writers hang.
version of the rust-mysql-simple: latest master
My understanding is that this is root of the problem
read_packet
inhandle_result_set
from line src/conn/mod.rs:914 returns an error.handle_next -> query_result:147
matches an error and sets self.state to Erroredself.conn.more_results_exists()
will keep on returning true because nothing touchesstatus_flags
in this flow.Callers generally expect the code to return OnBoundary or Done at some point.
death loop is entered via
ResultSet
drop
call.In case of network failure let's say the target endpoint goes down, read_packet will be returning error forever, so this will spin forever.
I have made a very silly commit that adds logs to confirm that above is the issue here is the commit:
fulara@186f615
Here are log statements ( from one thread):
Silly log statements
You can say this is a more involved case of this: #285 Whcih probably does not work in this case because the code bails out earlier.
The text was updated successfully, but these errors were encountered: