MXS-3038: Don't connect to lagging slaves
There's no use connecting to a lagging slave if a replication lag limit has been set.
This commit is contained in:
parent
9e91cfdded
commit
4fe71b41ed
@ -507,7 +507,8 @@ bool RWSplitSession::open_connections()
|
||||
for (auto& backend : m_raw_backends)
|
||||
{
|
||||
if (!backend->in_use() && backend->can_connect() && valid_for_slave(backend, master)
|
||||
&& backend->server()->rank() == current_rank)
|
||||
&& backend->server()->rank() == current_rank
|
||||
&& rpl_lag_is_ok(backend, get_max_replication_lag()))
|
||||
{
|
||||
candidates.push_back(backend);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user