Better tracking for slave status bits
The monitor can now differentiate between slaves with a running series of slave connections to the master from slaves with broken links. Both still get the SERVER_SLAVE-flag if 'detect_stale_slave' is on. Also, relay servers must be running.
This commit is contained in:
@ -465,19 +465,7 @@ void MariaDBMonitor::tick()
|
||||
|
||||
// Always re-assign master, slave etc bits as these depend on other factors outside topology
|
||||
// (e.g. slave sql state).
|
||||
assign_master_and_slave();
|
||||
|
||||
if (!m_ignore_external_masters)
|
||||
{
|
||||
// Do a sweep through all the nodes in the cluster (even the master) and mark external slaves.
|
||||
for (MariaDBServer* server : m_servers)
|
||||
{
|
||||
if (!server->m_node.external_masters.empty())
|
||||
{
|
||||
server->set_status(SERVER_SLAVE_OF_EXT_MASTER);
|
||||
}
|
||||
}
|
||||
}
|
||||
assign_server_roles();
|
||||
|
||||
if (m_master != NULL && m_master->is_master())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user