MXS-1703 Run astyle, rewrite comments & reorder fields

No functional changes.
This commit is contained in:
Esa Korhonen
2018-04-12 17:49:32 +03:00
parent 4d6239635e
commit 3c8d3feff9
5 changed files with 63 additions and 62 deletions

View File

@ -52,7 +52,8 @@ GtidList GtidList::from_string(const string& gtid_string)
error = true; error = true;
} }
} }
} while (have_more && !error); }
while (have_more && !error);
if (error) if (error)
{ {
@ -96,7 +97,8 @@ bool GtidList::operator == (const GtidList& rhs) const
return m_triplets == rhs.m_triplets; return m_triplets == rhs.m_triplets;
} }
uint64_t GtidList::events_ahead(const GtidList& lhs, const GtidList& rhs, substraction_mode_t domain_substraction_mode) uint64_t GtidList::events_ahead(const GtidList& lhs, const GtidList& rhs,
substraction_mode_t domain_substraction_mode)
{ {
const size_t n_lhs = lhs.m_triplets.size(); const size_t n_lhs = lhs.m_triplets.size();
const size_t n_rhs = rhs.m_triplets.size(); const size_t n_rhs = rhs.m_triplets.size();

View File

@ -107,45 +107,44 @@ private:
MXS_MONITOR* m_monitor_base; /**< Generic monitor object */ MXS_MONITOR* m_monitor_base; /**< Generic monitor object */
THREAD m_thread; /**< Monitor thread */ THREAD m_thread; /**< Monitor thread */
unsigned long m_id; /**< Monitor ID */ unsigned long m_id; /**< Monitor ID */
volatile bool m_keep_running; /**< Set to false to cause monitor thread to exit. */ volatile bool m_keep_running; /**< Should monitor main loop keep running? */
volatile int m_status; /**< Monitor status. */ volatile int m_status; /**< Monitor status */
ServerArray m_servers; /**< Servers of the monitor. */ ServerArray m_servers; /**< Servers of the monitor */
ServerInfoMap m_server_info; /**< Contains server specific information */ ServerInfoMap m_server_info; /**< Map from server base struct to MariaDBServer */
// Values updated by monitor // Values updated by monitor
int64_t m_master_gtid_domain; /**< Gtid domain currently used by the master */ MariaDBServer* m_master; /**< Master server for Master/Slave replication */
int64_t m_master_gtid_domain; /**< gtid_domain_id most recently seen on the master */
std::string m_external_master_host; /**< External master host, for fail/switchover */ std::string m_external_master_host; /**< External master host, for fail/switchover */
int m_external_master_port; /**< External master port */ int m_external_master_port; /**< External master port */
MariaDBServer *m_master; /**< Master server for MySQL Master/Slave replication */
// Replication topology detection settings // Replication topology detection settings
bool m_mysql51_replication; /**< Use MySQL 5.1 replication */ bool m_allow_cluster_recovery; /**< Allow failed servers to rejoin the cluster */
bool m_detect_replication_lag; /**< Monitor flag for MySQL replication heartbeat */
bool m_detect_multimaster; /**< Detect and handle multi-master topologies */
bool m_detect_stale_master; /**< Monitor flag for MySQL replication Stale Master detection */ bool m_detect_stale_master; /**< Monitor flag for MySQL replication Stale Master detection */
bool m_detect_stale_slave; /**< Monitor flag for MySQL replication Stale Slave detection */ bool m_detect_stale_slave; /**< Monitor flag for MySQL replication Stale Slave detection */
bool m_detect_multimaster; /**< Detect and handle multi-master topologies */
bool m_ignore_external_masters; /**< Ignore masters outside of the monitor configuration */
bool m_detect_standalone_master; /**< If standalone master are detected */ bool m_detect_standalone_master; /**< If standalone master are detected */
bool m_allow_cluster_recovery; /**< Allow failed servers to rejoin the cluster */ bool m_ignore_external_masters; /**< Ignore masters outside of the monitor configuration */
bool m_warn_set_standalone_master; /**< Log a warning when setting standalone master */ bool m_mysql51_replication; /**< Use MySQL 5.1 replication */
// Failover, switchover and rejoin settings // Failover, switchover and rejoin settings
bool m_auto_failover; /**< Is automatic master failover is enabled? */
bool m_auto_rejoin; /**< Is automatic rejoin enabled? */
int m_failcount; /**< Numer of cycles master must be down before auto-failover begins */
std::string m_replication_user; /**< Replication user for CHANGE MASTER TO-commands */ std::string m_replication_user; /**< Replication user for CHANGE MASTER TO-commands */
std::string m_replication_password; /**< Replication password for CHANGE MASTER TO-commands */ std::string m_replication_password; /**< Replication password for CHANGE MASTER TO-commands */
int m_failcount; /**< How many monitoring cycles master must be down before auto-failover uint32_t m_failover_timeout; /**< Time limit in seconds for master failover */
* begins */ uint32_t m_switchover_timeout; /**< Time limit in seconds for master switchover */
uint32_t m_failover_timeout; /**< Timeout in seconds for the master failover */ bool m_verify_master_failure; /**< Is master failure is verified via slaves? */
uint32_t m_switchover_timeout; /**< Timeout in seconds for the master switchover */
bool m_verify_master_failure; /**< Whether master failure is verified via slaves */
int m_master_failure_timeout; /**< Master failure verification (via slaves) time in seconds */ int m_master_failure_timeout; /**< Master failure verification (via slaves) time in seconds */
bool m_auto_failover; /**< If automatic master failover is enabled */ ServerArray m_excluded_servers; /**< Servers banned for master promotion during auto-failover or
bool m_auto_rejoin; /**< Attempt to start slave replication on standalone servers or servers * autoselect switchover. */
* replicating from the wrong master automatically. */
ServerArray m_excluded_servers; /**< Servers banned for master promotion during auto-failover. */
// Other settings // Other settings
std::string m_script; /**< Script to call when state changes occur on servers */ std::string m_script; /**< Script to call when state changes occur on servers */
uint64_t m_events; /**< enabled events */ uint64_t m_events; /**< enabled events */
bool m_detect_replication_lag; /**< Monitor flag for MySQL replication heartbeat */ bool m_warn_set_standalone_master; /**< Log a warning when setting standalone master */
enum slave_down_setting_t enum slave_down_setting_t
{ {