[jboss-remoting-issues] [JBoss JIRA] Closed: (JBREM-1105) DefaultLoadBalancer doesn't use all available server (if there are x servers available it uses x-1 of these)
Ron Sigal (JIRA)
jira-events at lists.jboss.org
Wed Sep 2 19:46:34 EDT 2009
[ https://jira.jboss.org/jira/browse/JBREM-1105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ron Sigal closed JBREM-1105.
----------------------------
Resolution: Done
Fix applied.
Thanks, Mikail, for pointing out the flaw. Note that, in general, I won't be putting much time into supporting the more esoteric aspects of the 2.x versions of Remoting. But this one was simple.
> DefaultLoadBalancer doesn't use all available server (if there are x servers available it uses x-1 of these)
> ------------------------------------------------------------------------------------------------------------
>
> Key: JBREM-1105
> URL: https://jira.jboss.org/jira/browse/JBREM-1105
> Project: JBoss Remoting
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: transporter
> Affects Versions: 2.5.1 (Flounder), 2.2.3
> Environment: JBoss EAP 4.3.0, Windows XP, Java 1.6.0_11
> Reporter: Mikael Thorman
> Assignee: Ron Sigal
> Fix For: 2.5.2 (Flounder), 2.2.3.SP1
>
>
> Invalid use of the Random nextInt function in class: org.jboss.remoting.transporter.DefaultLoadBalancer function: selectServer
> Current code:
> index = new Random().nextInt(size - 1);
> Should be:
> index = new Random().nextInt(size);
> tested current code with 2 servers and it always chooses the first one until this is shut, first after this it uses the second one.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-remoting-issues
mailing list