Add missing handling of max_slave_connections

The parameter accepts both counts and percentages which requires special
handling in the router. This needs to be done when the configuration is
updated.
This commit is contained in:
Markus Mäkelä 2018-07-07 21:46:04 +03:00
parent 30d3dcfd4e
commit 1e68261bce
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -435,8 +435,16 @@ uint64_t RWSplit::getCapabilities()
bool RWSplit::configure(MXS_CONFIG_PARAMETER* params)
{
m_config.reset(new Config(params));
return true;
bool rval = false;
SConfig cnf(new Config(params));
if (handle_max_slaves(cnf, config_get_string(params, "max_slave_connections")))
{
m_config = std::move(cnf);
rval = true;
}
return rval;
}
/**