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:
@ -271,8 +271,8 @@ inline bool server_is_master(const SERVER* server)
|
||||
|
||||
inline bool status_is_slave(uint64_t status)
|
||||
{
|
||||
return (status & (SERVER_RUNNING | SERVER_SLAVE | SERVER_MAINT)) ==
|
||||
(SERVER_RUNNING | SERVER_SLAVE);
|
||||
return ((status & (SERVER_RUNNING | SERVER_MAINT)) == SERVER_RUNNING) &&
|
||||
((status & SERVER_SLAVE) || (status & SERVER_WAS_SLAVE));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user