MXS-2652 Do not clear maintenance flag when a server goes down

The set of flags to clear should be well-defined.
This commit is contained in:
Esa Korhonen
2019-08-30 18:14:04 +03:00
parent ea9a823a25
commit 00feb61b23
3 changed files with 8 additions and 10 deletions

View File

@ -2839,18 +2839,12 @@ void MonitorInstanceSimple::tick()
* the server state bits. This would allow clearing the state by
* zeroing it out.
*/
const uint64_t bits_to_clear = ~SERVER_WAS_MASTER;
monitor_clear_pending_status(pMs, bits_to_clear);
monitor_clear_pending_status(pMs, SERVER_DOWN_CLEAR_BITS);
if (mysql_errno(pMs->con) == ER_ACCESS_DENIED_ERROR)
{
monitor_set_pending_status(pMs, SERVER_AUTH_ERROR);
}
else
{
monitor_clear_pending_status(pMs, SERVER_AUTH_ERROR);
}
if (mon_status_changed(pMs) && mon_print_fail_status(pMs))
{