config.h: Added enumerated types MAX_RLAG_AVAILABLE and MAX_RLAG_UNDEFINED to be used instead of magic numbers as max_slave_replication_lag values.
readwritesplit.h: Added TARGET_RLAG_MAX to the list of hint targets. It is used in case of hint max_slave_replication_lag=<value> readwritesplit.c: get_dcb is called when readwritesplit router chooses target backend for a query. Backend is selected from those the router has connection to. get_dcb now takes additional parameters, name and max_rlag. Name is used if there is a hint route to server <server name>. max_rlag is used for hint max_slave_replication_lag=<value> or if it doesn't exist, then for configure parameter max_slave_replication_lag=<configured value> or if both are absent, ignored.
This commit is contained in:
@ -46,6 +46,8 @@ typedef enum {
|
||||
BOOL_TYPE = 0x08
|
||||
} config_param_type_t;
|
||||
|
||||
enum {MAX_RLAG_NOT_AVAILABLE=-1, MAX_RLAG_UNDEFINED=-2};
|
||||
|
||||
#define PARAM_IS_TYPE(p,t) ((p) & (t))
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user