MXS-1777 Changing server weights to match 2.2 behavior.

Match 2.2, changed the weights back to non-inverse because 0-weight
is a special case. Renamed to server_weight for greppability.
This commit is contained in:
Niclas Antti
2018-09-24 12:05:47 +03:00
parent d0c5b2ff61
commit 7d231e5328
5 changed files with 30 additions and 29 deletions

View File

@ -63,7 +63,7 @@ typedef struct server_ref_t
{
struct server_ref_t* next; /**< Next server reference */
SERVER* server; /**< The actual server */
double inv_weight; /**< Inverse of weight in the range [0..1], 0 is best. */
double server_weight; /**< Weight in the range [0..1]. 0 is worst, and a special case. */
int connections; /**< Number of connections created through this reference */
bool active; /**< Whether this reference is valid and in use*/
} SERVER_REF;