Fix to bug #629, http://bugs.skysql.com/show_bug.cgi?id=629
Master was selected for routing target even there was a slave available.
This commit is contained in:
@ -1212,9 +1212,10 @@ static bool get_dcb(
|
|||||||
* backend and update assign it to new candidate if
|
* backend and update assign it to new candidate if
|
||||||
* necessary.
|
* necessary.
|
||||||
*/
|
*/
|
||||||
else if (max_rlag == MAX_RLAG_UNDEFINED ||
|
else if (SERVER_IS_SLAVE(b->backend_server) &&
|
||||||
|
(max_rlag == MAX_RLAG_UNDEFINED ||
|
||||||
(b->backend_server->rlag != MAX_RLAG_NOT_AVAILABLE &&
|
(b->backend_server->rlag != MAX_RLAG_NOT_AVAILABLE &&
|
||||||
b->backend_server->rlag <= max_rlag))
|
b->backend_server->rlag <= max_rlag)))
|
||||||
{
|
{
|
||||||
candidate_bref = check_candidate_bref(
|
candidate_bref = check_candidate_bref(
|
||||||
candidate_bref,
|
candidate_bref,
|
||||||
|
|||||||
Reference in New Issue
Block a user