MXS-1845 Only select a master if current master is no longer usable

The purpose is to make the selected master server sticky. The master is reselected only
if the current master is no longer a valid master.
This commit is contained in:
Esa Korhonen
2018-06-12 10:27:23 +03:00
parent 95935991ab
commit 2f987d0b10
6 changed files with 174 additions and 36 deletions

View File

@ -38,8 +38,9 @@ SlaveStatus::SlaveStatus()
, slave_sql_running(false)
{}
MariaDBServer::MariaDBServer(MXS_MONITORED_SERVER* monitored_server)
MariaDBServer::MariaDBServer(MXS_MONITORED_SERVER* monitored_server, int config_index)
: m_server_base(monitored_server)
, m_config_index(config_index)
, m_print_update_errormsg(true)
, m_version(version::UNKNOWN)
, m_server_id(SERVER_ID_UNKNOWN)