-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Error when encoding value breaks connection permanently #367
Comments
Ok interesting, yeah definitely a bug, thanks for reporting @jvf. Any chance you or @harunzengin could give this a try? I was on vacation and I won't have time next week (catch up week!) so it'd be a while til I could get to this. |
@harunzengin agreed to look into this. |
Any updates here @jvf ? , I also ran into the same issue |
I looked into this. I think the problem is this: When we execute a query we first allocate a stream id. Then the encoding fails due to the wrong type. But when an encoding error occurs during value serialization, the stream ID is never properly released. This stream id is permanently unusable, resulting in permeant I tried a bit to fix releasing the stream ids correctly in case of error, but I have not yet found the correct way to do it. @whatyouhide If you have any hints I am happy to try to implement it. |
I think I found a way to do it, I will provide a PR soon. |
I noticed that inserting with a type error in the inserted values breaks a connection permanently (output shortened):
This looks like a bug to me. The same works with different
max_concurrent_requests_per_connection
settings but you have to make more erroneous calls. It looks like each call that produces an encoding error "consumes" one of the concurrent requests, presumably by using up one a stream id without releasing it?I also tried the same experiment with
Xandra.execute(conn, "SELECT * FROM non_existing_table")
but this does not break the connection.The text was updated successfully, but these errors were encountered: