-
Notifications
You must be signed in to change notification settings - Fork 275
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
Selector completes receives on a connection before completing sends if there are errors #376
Comments
Still not sure if I completely catch what you are saying.
For the same channel, once a send is completed, shouldn't we only expect response to arrive (hence reading from the channel)? |
My point with that statement was that interest ops are set to READ only after the send is completed, so there should not be any read happening on a channel while the send is ongoing. Anyway, I looked into the code further and it seems that I was wrong about the premise that interest ops are set to READ only after the send completed. I see that what we do after a connection is established is this: I am not sure if More importantly, when sending, the Selector does this in Now, since the existing interest ops already has OP_READ (because that was done in Perhaps I tried setting things this way, but the unit tests started failing and I didn't get to dig deeper. It could be that the tests are expecting something unreasonable. This needs to be investigated. |
@pnarayanan @nsivabalan Is this still relevant? |
@pnarayanan @nsivabalan ping |
Just noticed during some testing that the ambry selector can complete receive on a connection id when the send is not complete. A quick look at the code indicates that the interest ops are only set to READ when the send is completed, so not sure how this happens. This seems like a bug and needs to be investigated and fixed.
This happened when there were timeout errors and such happening, but interestingly, did not notice any error on the said connection (if not it would not have been able to complete the receive, I think)
Will try to add more details.
The text was updated successfully, but these errors were encountered: