-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[grid] ensure --drain-after-session-count is respected with a lot of sessions in the queue #14987
Conversation
…sessions in the queue
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
@VietND96 i think this might be interresting for you too? |
As far as I understand, this PR will handle a case where the node is set e.g |
Yes, the node did start to drain to early due to this and the still running sessions did get stuck. |
Yes, it makes sense since this is a case that I was also thinking about. |
User description
Description
This PR will ensure a node does not start more than drain-after-session-count session by moving the counter check before starting a new session. The
drainLock
does ensure we do not drain to early while another session is still starting.Motivation and Context
When a new node does register and there are alot of sessions in the queue, the node did start more than expected sessions.
Types of changes
Checklist
PR Type
Bug fix
Description
Changes walkthrough 📝
LocalNode.java
Fix race condition in session count tracking and node draining
java/src/org/openqa/selenium/grid/node/local/LocalNode.java