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

@ -99,6 +99,7 @@ typedef enum select_criteria {
/** default values for rwsplit configuration parameters */
#define CONFIG_MAX_SLAVE_CONN 1
#define CONFIG_MAX_SLAVE_RLAG -1 /*< not used */
#define GET_SELECT_CRITERIA(s) \
(strncmp(s,"LEAST_GLOBAL_CONNECTIONS", strlen("LEAST_GLOBAL_CONNECTIONS")) == 0 ? \
@ -201,6 +202,7 @@ typedef struct rwsplit_config_st {
int rw_max_slave_conn_percent;
int rw_max_slave_conn_count;
select_criteria_t rw_slave_select_criteria;
int rw_max_slave_replication_lag;
} rwsplit_config_t;