[MXS-494] Weight calculation favors servers without connections Created: 2015-12-01 Updated: 2015-12-02 Resolved: 2015-12-02 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | readconnroute |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | 1.3.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | markus makela | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
If two servers are configured, one with a weight of 100 and the other with a weight of 1, and 50 connections are made to a service using readconnroute one of the connections will always go to the server with the lower weight. This is caused by the use of the actual amount of connections divided by the server weight as the basis of the server selection process. This behavior does not correctly represent the documented behavior and instead of the amount of connections, the amount of connections + 1 should be used for the calculation. |
| Comments |
| Comment by markus makela [ 2015-12-02 ] |
|
The weights are now properly calculated for servers without connections. The fix to this is in commit 45abfeec2c49334f09b2d7c04837cbd2b683bfbc. |