MAX-94, Added configuration parameter, max_slave_replication_lag=<longest allowed replication lag in seconds> to router section.

Parameter can be changed runtime but it requires reloading of config.
This commit is contained in:
VilhoRaatikka
2014-06-30 22:35:27 +03:00
parent aa828e8751
commit b875936a21
6 changed files with 257 additions and 90 deletions

View File

@ -999,11 +999,12 @@ int service_refresh_users(SERVICE *service) {
return 1;
}
bool service_set_slave_conn_limit (
SERVICE* service,
CONFIG_PARAMETER* param,
char* valstr,
count_spec_t count_spec)
bool service_set_param_value (
SERVICE* service,
CONFIG_PARAMETER* param,
char* valstr,
count_spec_t count_spec,
config_param_type_t type)
{
char* p;
int valint;
@ -1034,11 +1035,15 @@ bool service_set_slave_conn_limit (
{
succp = false;
}
else
else if (PARAM_IS_TYPE(type,PERCENT_TYPE))
{
succp = true;
config_set_qualified_param(param, (void *)&valint, PERCENT_TYPE);
}
else
{
/** Log error */
}
}
else
{
@ -1053,11 +1058,15 @@ bool service_set_slave_conn_limit (
{
succp = false;
}
else
else if (PARAM_IS_TYPE(type,COUNT_TYPE))
{
succp = true;
config_set_qualified_param(param, (void *)&valint, COUNT_TYPE);
}
else
{
/** Log error */
}
}
if (succp)