Fix server priority regression
Servers without priorities were chosen instead of servers with priorities. This caused at least the server_weight test to fail.
This commit is contained in:
parent
df1f3ca7c6
commit
ee2c3e21c7
@ -709,11 +709,9 @@ static MXS_MONITORED_SERVER *get_candidate_master(MXS_MONITOR* mon)
|
||||
}
|
||||
}
|
||||
else if (moitor_servers->server->node_id >= 0 &&
|
||||
(!handle->use_priority || /** Server priority disabled*/
|
||||
candidate_master == NULL || /** No candidate chosen */
|
||||
/** Candidate has no priority */
|
||||
!server_get_parameter_nolock(moitor_servers->server, "priority", buf, sizeof(buf))))
|
||||
(!handle->use_priority || candidate_master == NULL))
|
||||
{
|
||||
// Server priorities are not in use or no candidate has been found
|
||||
if (min_id < 0 || moitor_servers->server->node_id < min_id)
|
||||
{
|
||||
min_id = moitor_servers->server->node_id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user