Fix stale master detection in multimaster mode

The MySQL monitor now correctly assigns stale status to master servers.
This commit is contained in:
Markus Makela 2016-09-06 14:23:28 +03:00
parent 506ef1b9f6
commit 4cd36161ee

View File

@ -1179,8 +1179,9 @@ void find_graph_cycles(MYSQL_MONITOR *handle, MONITOR_SERVERS *database, int nse
monitor_clear_pending_status(graph[i].db, SERVER_SLAVE);
}
}
else if (handle->detectStaleMaster && cycle == 0 && graph[i].cycle == 0 &&
graph[i].db->server->status & SERVER_MASTER)
else if (handle->detectStaleMaster && cycle == 0 &&
graph[i].db->server->status & SERVER_MASTER &&
(graph[i].db->pending_status & SERVER_MASTER) == 0)
{
/**
* Stale master detection is handled here for multi-master mode.