MXS-1775 Check disk space warning bit when selecting a new master for failover

This also applies to autoselect switchover. The disk space warning has the least
priority, as the other criteria could lead to replication failures. Also, print
the reason the new master was selected over the second best candidate.
This commit is contained in:
Esa Korhonen
2018-06-14 11:32:34 +03:00
parent 019d62bbb8
commit 58207ec414
2 changed files with 49 additions and 14 deletions

View File

@ -242,7 +242,7 @@ private:
MariaDBServer* select_new_master(ServerArray* slaves_out, json_t** err_out);
bool server_is_excluded(const MariaDBServer* server);
bool is_candidate_better(const MariaDBServer* current_best, const MariaDBServer* candidate,
uint32_t gtid_domain);
uint32_t gtid_domain, std::string* reason_out = NULL);
bool promote_new_master(MariaDBServer* new_master, json_t** err_out);
int redirect_slaves(MariaDBServer* new_master, const ServerArray& slaves,
ServerArray* redirected_slaves);