Remove depth field from SERVER

It was not really used anymore.
This commit is contained in:
Esa Korhonen
2018-06-27 14:07:12 +03:00
parent 960d08a36a
commit a59c0c61ce
7 changed files with 13 additions and 42 deletions

View File

@ -297,18 +297,12 @@ void MMMonitor::update_server_status(MXS_MONITORED_SERVER* monitored_server)
{
monitor_clear_pending_status(monitored_server, SERVER_SLAVE);
monitor_set_pending_status(monitored_server, SERVER_MASTER);
/* Set replication depth to 0 */
monitored_server->server->depth = 0;
}
else if (isslave)
{
monitor_set_pending_status(monitored_server, SERVER_SLAVE);
/* Avoid any possible stale Master state */
monitor_clear_pending_status(monitored_server, SERVER_MASTER);
/* Set replication depth to 1 */
monitored_server->server->depth = 1;
}
/* Avoid any possible Master/Slave stale state */
else
@ -382,7 +376,7 @@ MXS_MONITORED_SERVER *MMMonitor::get_current_master()
continue;
}
if (ptr->server->depth == 0)
if (ptr->pending_status & SERVER_MASTER)
{
m_master = ptr;
}