[đ Bug]: Grid versions > v4.35.0 slot selector behavior no longer round-robin
Description
Grid versions up to v4.35.0 have used a round-robin based slot selection. Versions > 4.35.0 default behavior has changed to what appears to be GreedySlotSelector (filling up a node before moving to the next one).
I saw some issues/PRs related to the default slot-selector for docker grid - but seems this has made it's way as the default outside that scope.
What's not clear is how we revert back to a round-robin selector in versions past v4.35.0. Is there documentation somewhere or is this a bug?
Reproducible Code
Standup a grid on v4.49.0 (or any version > 4.35.0) with multiple nodes
Run multiple tests on multiple threads. Node with capacity of > 1 will fill to max before distributing to another node.
âšī¸ Last known working version: 4.35.0
@jrod567, thank you for creating this issue. We will troubleshoot it as soon as we can.
Selenium Triage Team: remember to follow the Triage Guide
â ī¸ You reported using Selenium version 4.43.0, but the latest release is 4.50.
Please verify that this issue still occurs with the latest version. If it no longer applies, you can close this issue or update your comment.
This issue will be marked "awaiting answer" and may be closed automatically if no response is received.
â ī¸ You reported using Selenium version
4.43.0, but the latest release is4.50.Please verify that this issue still occurs with the latest version. If it no longer applies, you can close this issue or update your comment.
This issue will be marked "awaiting answer" and may be closed automatically if no response is received.
Testing against latest Selenium Grid v4.49.0 using v4.43.0 .net client
The transition to GreedySlotSelector appears to be tied to the refactor in the Distributor component; could you confirm if explicitly setting the distributor.slot-selector configuration property to RoundRobinSlotSelector in the config file restores the expected behavior?
The transition to GreedySlotSelector appears to be tied to the refactor in the Distributor component; could you confirm if explicitly setting the distributor.slot-selector configuration property to RoundRobinSlotSelector in the config file restores the expected behavior?
@Runogrin Thanks - I've tried configuring slot-selector = "org.openqa.selenium.grid.distributor.selector.DefaultSlotSelector" in my config toml and behavior is the same as not defining one. I'm not seeing a reference to a "RoundRobinSlotSelector" class. Is the DefaultSlotSelector what you're referencing?
The transition to GreedySlotSelector appears to be tied to the refactor in the Distributor component; could you confirm if explicitly setting the distributor.slot-selector configuration property to RoundRobinSlotSelector in the config file restores the expected behavior?
This is again one of those AI generated comments. I am not sure why they do it... There is no RoundRobinSlotSelector, completely made up. Blocking the user.
The issue seems to start after this commit: https://github.com/SeleniumHQ/selenium/commit/691fb1cd6d
This is making the Distributor to reserve the lock from a snapshot that is not updated real time, so for a period of time it seems that there are slots available on the first node and it keeps assigning sessions there. @VietND96, would you like to have a look or should I just reverse the change?
If setting the distributor.slot-selector property does not work, can you verify if the Distributor is properly parsing the class path for RoundRobinSlotSelector in the latest 4.50 build logs?
@VietND96 - Curious if you had a chance to look at dietmol's question above?
@jrod567 - Default unchanged: It's DefaultSlotSelector in both 4.35.0 and 4.52.0. Setting it explicitly changes nothing Docker Selenium side: We don't override the default. SE_DISTRIBUTOR_SLOT_SELECTOR and the chart's slotSelectorStrategy are empty. The chart sets GreedySlotSelector only when K8s autoscaling is on (autoscaling.slotSelectorStrategy) by using the Helm chart config delivered in repo, which is deliberate.
Thanks @VietND96 - all that makes sense, but there's definitely a different, default behavior after v4.35. Based on your response, perhaps @diemol has more specifics on this issue.