-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[grid] Improve readTimeout in handle session between Router and Node #16163
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
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
@joerg1985, ignore the change to bring back Cache builder in session handler. Here I just add to fetch session timeout and set to ClientConfig. Can you review it makes sense? |
@VietND96 i did not look too deep into the code, but my first approach would be returning the timeout (and other config) to the response the node does receive when registering it self to the grid. In this case we should have no need for fallbacks or additional execption handling. What happens in case someone did set a different timeout to the node via the cli? Do we need to handle this? I am not sure ... |
@joerg1985, actually Distributor also gets the node session timeout to set session timeout in GridModel.
As I mentioned above on NodeStatus, timeout would be different between Node via its config. By implementing this, we will have a unified timeout between sessions, the connection of the router to a particular Node. |
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
@joerg1985 I fixed one of your review in another PR
The usage of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think the try catch is not needed, but this should not hurt.
ps: The test i mentioned we should add is allready in place NettyServerTest.doesInterruptPending
.
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
@joerg1985 after checking again, I removed the catch block, and added |
User description
🔗 Related Issues
💥 What does this PR do?
HttpClient cache issue described in #12978.
However, the HttpClient created still uses the default ClientConfig
In order to improve the connection between Router and Node for routing commands, Router will fetch the session timeout that Node exposed to set readTimeout in ClientConfig before creating HttpClient (if no session timeout found, silent fallback to default of ClientConfig).
FINE logs as below
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Improve Router-Node connection timeout handling
Fetch session timeout from Node status endpoint
Configure HttpClient readTimeout dynamically
Add error handling for timeout configuration
Diagram Walkthrough
File Walkthrough
HandleSession.java
Dynamic timeout configuration for Router-Node communication
java/src/org/openqa/selenium/grid/router/HandleSession.java