-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix: Improper read timeout handling. #621
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
Conversation
JAVA-3920
@konrad-kaminski
Here are the differences I can see:
I will be working on a PR that uses the cooperative approach (likely without the part where an event loop thread helps completing the task submitted by a user thread, because this makes things even more nontrivial without resulting in any substantial benefits). @konrad-kaminski this problem does not seem to be simple, so I may be incorrect somewhere. I want you to know that I am open to discussing it, and highly appreciate what you have already contributed. P.S. While thinking about this PR, I realized that we don't need |
I changed my PR to reflect the changes I think can be done to address the things you mentioned. I reuse I got rid of |
I'd rather say that all other operations in Anyway, I tried to preserve the code in 1 The section "15.3.3 Scheduling implementation internals" in the "Netty in action" book:
The "100% exact" wording is weird because no scheduling in non-realtime systems is accurate, but the author clearly suggests that there are more accurate implementations. |
I've taken a look at your PR and even made a PR for it. This actually addresses only one thing, namely it does not schedule a timeout when it's not needed. As you stated the code in As a side note: I see that your style of code differs from the one that is prevalent in mongo-driver. Examples of the differences are e.g. usage of early returns (IMHO unnecessary e.g. in |
Hi @konrad-kaminski. We closed PR#635, here is the details. You probably will be pleased to see that all the improvements you suggested are implemented in the new PR#636. |
Thank you for pointing this out. For now I am refraining from using the early return pattern and from using |
Fixed in #636. |
Fix for JAVA-3920.