Merge branch '2.3' into develop

This commit is contained in:
Esa Korhonen
2019-01-21 13:51:50 +02:00
5 changed files with 70 additions and 15 deletions

View File

@ -134,6 +134,15 @@ public:
// Controlled by the session
ResponseStat& response_stat();
/**
* Change server replication lag state and log warning when state changes.
*
* @param new_state New replication lag state
* @param max_rlag Maximum allowed lag. Used for the log message.
*/
void change_rlag_state(SERVER::RLagState new_state, int max_rlag);
private:
reply_state_t m_reply_state;
BackendHandleMap m_ps_handles; /**< Internal ID to backend PS handle mapping */

View File

@ -142,6 +142,13 @@ public:
CLUSTRIX
};
enum class RLagState
{
NONE,
BELOW_LIMIT,
ABOVE_LIMIT
};
struct Version
{
uint64_t total = 0; /**< The version number received from server */
@ -193,9 +200,10 @@ public:
unsigned long node_ts = 0; /**< Last timestamp set from M/S monitor module */
// Misc fields
bool master_err_is_logged = false; /**< If node failed, this indicates whether it is logged. Only
* used by rwsplit. TODO: Move to rwsplit */
bool warn_ssl_not_enabled = true; /**< SSL not used for an SSL enabled server */
bool master_err_is_logged = false; /**< If node failed, this indicates whether it is logged. Only
* used by rwsplit. TODO: Move to rwsplit */
bool warn_ssl_not_enabled = true; /**< SSL not used for an SSL enabled server */
RLagState rlag_state = RLagState::NONE; /**< Is replication lag above or under limit? Used by rwsplit. */
virtual ~SERVER() = default;