Clear status bits of server that are down
At the start of the monitor tick, the monitor pending status is set to the value of the current server status. This allows the informative and history bits to survive even if a server goes down. To make sure that no stale state bits are in effect when the post_tick method is called, the pending status must be cleared of all status bits.
This commit is contained in:
@ -2862,7 +2862,14 @@ void MonitorInstanceSimple::tick()
|
||||
}
|
||||
else
|
||||
{
|
||||
monitor_clear_pending_status(pMs, SERVER_RUNNING);
|
||||
/**
|
||||
* TODO: Move the bits that do not represent a state out of
|
||||
* 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);
|
||||
|
||||
if (mysql_errno(pMs->con) == ER_ACCESS_DENIED_ERROR)
|
||||
{
|
||||
|
Reference in New Issue
Block a user