MXS-2271 Rename MXS_MONITORED_SERVER to MonitorServer
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
#include <maxscale/modinfo.h>
|
||||
#include <maxscale/mysql_utils.hh>
|
||||
|
||||
using maxscale::MXS_MONITORED_SERVER;
|
||||
using maxscale::MonitorServer;
|
||||
|
||||
AuroraMonitor::AuroraMonitor(const std::string& name, const std::string& module)
|
||||
: MonitorWorkerSimple(name, module)
|
||||
@ -56,7 +56,7 @@ bool AuroraMonitor::has_sufficient_permissions()
|
||||
*
|
||||
* @param monitored_server Server whose status should be updated
|
||||
*/
|
||||
void AuroraMonitor::update_server_status(MXS_MONITORED_SERVER* monitored_server)
|
||||
void AuroraMonitor::update_server_status(MonitorServer* monitored_server)
|
||||
{
|
||||
monitored_server->clear_pending_status(SERVER_MASTER | SERVER_SLAVE);
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ public:
|
||||
|
||||
protected:
|
||||
bool has_sufficient_permissions();
|
||||
void update_server_status(mxs::MXS_MONITORED_SERVER* monitored_server);
|
||||
void update_server_status(mxs::MonitorServer* monitored_server);
|
||||
|
||||
private:
|
||||
AuroraMonitor(const std::string& name, const std::string& module);
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
#include <maxbase/assert.h>
|
||||
|
||||
using maxscale::Monitor;
|
||||
using maxscale::MXS_MONITORED_SERVER;
|
||||
using maxscale::MonitorServer;
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -206,7 +206,7 @@ bool Clustrix::is_being_softfailed(const char* zName, const SERVER& server, MYSQ
|
||||
}
|
||||
|
||||
bool Clustrix::ping_or_connect_to_hub(const char* zName,
|
||||
const MXS_MONITORED_SERVER::ConnectionSettings& settings,
|
||||
const MonitorServer::ConnectionSettings& settings,
|
||||
Softfailed softfailed,
|
||||
SERVER& server,
|
||||
MYSQL** ppCon)
|
||||
|
||||
@ -65,7 +65,7 @@ bool is_part_of_the_quorum(const char* zName, const SERVER& server, MYSQL* pCon)
|
||||
*
|
||||
* @return True, if the node is part of the quorum, false otherwise.
|
||||
*/
|
||||
inline bool is_part_of_the_quorum(const char* zName, mxs::MXS_MONITORED_SERVER& ms)
|
||||
inline bool is_part_of_the_quorum(const char* zName, mxs::MonitorServer& ms)
|
||||
{
|
||||
mxb_assert(ms.server);
|
||||
mxb_assert(ms.con);
|
||||
@ -100,7 +100,7 @@ bool is_being_softfailed(const char* zName, const SERVER& server, MYSQL* pCon);
|
||||
* @note Upon return @c *ppCon will be non-NULL.
|
||||
*/
|
||||
bool ping_or_connect_to_hub(const char* zName,
|
||||
const mxs::MXS_MONITORED_SERVER::ConnectionSettings& settings,
|
||||
const mxs::MonitorServer::ConnectionSettings& settings,
|
||||
Softfailed softfailed,
|
||||
SERVER& server,
|
||||
MYSQL** ppCon);
|
||||
@ -117,9 +117,9 @@ bool ping_or_connect_to_hub(const char* zName,
|
||||
* @return True, if the server can be used as hub, false otherwise.
|
||||
*/
|
||||
inline bool ping_or_connect_to_hub(const char* zName,
|
||||
const mxs::MXS_MONITORED_SERVER::ConnectionSettings& settings,
|
||||
const mxs::MonitorServer::ConnectionSettings& settings,
|
||||
Softfailed softfailed,
|
||||
mxs::MXS_MONITORED_SERVER& ms)
|
||||
mxs::MonitorServer& ms)
|
||||
{
|
||||
return ping_or_connect_to_hub(zName, settings, softfailed, *ms.server, &ms.con);
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
namespace http = mxb::http;
|
||||
using namespace std;
|
||||
using maxscale::MXS_MONITORED_SERVER;
|
||||
using maxscale::MonitorServer;
|
||||
|
||||
#define LOG_JSON_ERROR(ppJson, format, ...) \
|
||||
do { \
|
||||
@ -215,7 +215,7 @@ void ClustrixMonitor::choose_hub(Clustrix::Softfailed softfailed)
|
||||
|
||||
for (auto it = m_servers.begin(); !pHub_con && (it != m_servers.end()); ++it)
|
||||
{
|
||||
MXS_MONITORED_SERVER& ms = **it;
|
||||
MonitorServer& ms = **it;
|
||||
|
||||
if (ips.find(ms.server->address) == ips.end())
|
||||
{
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
#include "clustrix.hh"
|
||||
|
||||
bool ClustrixNode::can_be_used_as_hub(const char* zName,
|
||||
const mxs::MXS_MONITORED_SERVER::ConnectionSettings& settings)
|
||||
const mxs::MonitorServer::ConnectionSettings& settings)
|
||||
{
|
||||
mxb_assert(m_pServer);
|
||||
bool rv = Clustrix::ping_or_connect_to_hub(zName, settings, Clustrix::Softfailed::REJECT,
|
||||
|
||||
@ -161,7 +161,7 @@ public:
|
||||
}
|
||||
|
||||
bool can_be_used_as_hub(const char* zName,
|
||||
const mxs::MXS_MONITORED_SERVER::ConnectionSettings& settings);
|
||||
const mxs::MonitorServer::ConnectionSettings& settings);
|
||||
|
||||
SERVER* server() const
|
||||
{
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#include <maxscale/modinfo.h>
|
||||
#include <maxscale/mysql_utils.hh>
|
||||
|
||||
using maxscale::MXS_MONITORED_SERVER;
|
||||
using maxscale::MonitorServer;
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -31,7 +31,7 @@ constexpr const char* alive_query = "SELECT mcsSystemReady() = 1 && mcsSystemRea
|
||||
constexpr const char* role_query = "SELECT mcsSystemPrimary()";
|
||||
|
||||
// Helper for extracting string results from queries
|
||||
static std::string do_query(MXS_MONITORED_SERVER* srv, const char* query)
|
||||
static std::string do_query(MonitorServer* srv, const char* query)
|
||||
{
|
||||
std::string rval;
|
||||
MYSQL_RES* result;
|
||||
@ -56,7 +56,7 @@ static std::string do_query(MXS_MONITORED_SERVER* srv, const char* query)
|
||||
}
|
||||
|
||||
// Returns a numeric version similar to mysql_get_server_version
|
||||
int get_cs_version(MXS_MONITORED_SERVER* srv)
|
||||
int get_cs_version(MonitorServer* srv)
|
||||
{
|
||||
// GCC 4.8 appears to have a broken std::regex_constants::ECMAScript that doesn't support brackets
|
||||
std::regex re("Columnstore \\([0-9]*\\)[.]\\([0-9]*\\)[.]\\([0-9]*\\)-[0-9]*",
|
||||
@ -95,7 +95,7 @@ bool CsMonitor::has_sufficient_permissions()
|
||||
return test_permissions(alive_query);
|
||||
}
|
||||
|
||||
void CsMonitor::update_server_status(MXS_MONITORED_SERVER* srv)
|
||||
void CsMonitor::update_server_status(MonitorServer* srv)
|
||||
{
|
||||
srv->clear_pending_status(SERVER_MASTER | SERVER_SLAVE | SERVER_RUNNING);
|
||||
int status = 0;
|
||||
|
||||
@ -26,7 +26,7 @@ public:
|
||||
|
||||
protected:
|
||||
bool has_sufficient_permissions();
|
||||
void update_server_status(mxs::MXS_MONITORED_SERVER* monitored_server);
|
||||
void update_server_status(mxs::MonitorServer* monitored_server);
|
||||
|
||||
private:
|
||||
CsMonitor(const std::string& name, const std::string& module);
|
||||
|
||||
@ -33,16 +33,16 @@
|
||||
#define DONOR_NODE_NAME_MAX_LEN 60
|
||||
#define DONOR_LIST_SET_VAR "SET GLOBAL wsrep_sst_donor = \""
|
||||
|
||||
using maxscale::MXS_MONITORED_SERVER;
|
||||
using maxscale::MonitorServer;
|
||||
|
||||
/** Log a warning when a bad 'wsrep_local_index' is found */
|
||||
static bool warn_erange_on_local_index = true;
|
||||
|
||||
static MXS_MONITORED_SERVER* set_cluster_master(MXS_MONITORED_SERVER*, MXS_MONITORED_SERVER*, int);
|
||||
static MonitorServer* set_cluster_master(MonitorServer*, MonitorServer*, int);
|
||||
static void disableMasterFailback(void*, int);
|
||||
static int compare_node_index(const void*, const void*);
|
||||
static int compare_node_priority(const void*, const void*);
|
||||
static bool using_xtrabackup(MXS_MONITORED_SERVER* database, const char* server_string);
|
||||
static bool using_xtrabackup(MonitorServer* database, const char* server_string);
|
||||
|
||||
GaleraMonitor::GaleraMonitor(const std::string& name, const std::string& module)
|
||||
: MonitorWorkerSimple(name, module)
|
||||
@ -130,7 +130,7 @@ bool GaleraMonitor::has_sufficient_permissions()
|
||||
return test_permissions("SHOW STATUS LIKE 'wsrep_local_state'");
|
||||
}
|
||||
|
||||
void GaleraMonitor::update_server_status(MXS_MONITORED_SERVER* monitored_server)
|
||||
void GaleraMonitor::update_server_status(MonitorServer* monitored_server)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
MYSQL_RES* result;
|
||||
@ -254,7 +254,7 @@ void GaleraMonitor::post_tick()
|
||||
*/
|
||||
|
||||
/* get the candidate master, following MXS_MIN(node_id) rule */
|
||||
MXS_MONITORED_SERVER* candidate_master = get_candidate_master();
|
||||
MonitorServer* candidate_master = get_candidate_master();
|
||||
|
||||
m_master = set_cluster_master(m_master, candidate_master, m_disableMasterFailback);
|
||||
|
||||
@ -318,7 +318,7 @@ void GaleraMonitor::post_tick()
|
||||
}
|
||||
}
|
||||
|
||||
static bool using_xtrabackup(MXS_MONITORED_SERVER* database, const char* server_string)
|
||||
static bool using_xtrabackup(MonitorServer* database, const char* server_string)
|
||||
{
|
||||
bool rval = false;
|
||||
MYSQL_RES* result;
|
||||
@ -365,9 +365,9 @@ static bool using_xtrabackup(MXS_MONITORED_SERVER* database, const char* server_
|
||||
* @param servers The monitored servers list
|
||||
* @return The candidate master on success, NULL on failure
|
||||
*/
|
||||
MXS_MONITORED_SERVER* GaleraMonitor::get_candidate_master()
|
||||
MonitorServer* GaleraMonitor::get_candidate_master()
|
||||
{
|
||||
MXS_MONITORED_SERVER* candidate_master = NULL;
|
||||
MonitorServer* candidate_master = NULL;
|
||||
long min_id = -1;
|
||||
int minval = INT_MAX;
|
||||
int currval;
|
||||
@ -437,9 +437,9 @@ MXS_MONITORED_SERVER* GaleraMonitor::get_candidate_master()
|
||||
* @param candidate_master The candidate master server accordingly to the selection rule
|
||||
* @return The master node pointer (could be NULL)
|
||||
*/
|
||||
static MXS_MONITORED_SERVER* set_cluster_master(MXS_MONITORED_SERVER* current_master,
|
||||
MXS_MONITORED_SERVER* candidate_master,
|
||||
int master_stickiness)
|
||||
static MonitorServer* set_cluster_master(MonitorServer* current_master,
|
||||
MonitorServer* candidate_master,
|
||||
int master_stickiness)
|
||||
{
|
||||
/*
|
||||
* if current master is not set or master_stickiness is not enable
|
||||
@ -488,7 +488,7 @@ static MXS_MONITORED_SERVER* set_cluster_master(MXS_MONITORED_SERVER* current_ma
|
||||
*/
|
||||
void GaleraMonitor::update_sst_donor_nodes(int is_cluster)
|
||||
{
|
||||
MXS_MONITORED_SERVER* ptr;
|
||||
MonitorServer* ptr;
|
||||
MYSQL_ROW row;
|
||||
MYSQL_RES* result;
|
||||
bool ignore_priority = true;
|
||||
@ -499,7 +499,7 @@ void GaleraMonitor::update_sst_donor_nodes(int is_cluster)
|
||||
}
|
||||
|
||||
unsigned int found_slaves = 0;
|
||||
MXS_MONITORED_SERVER* node_list[is_cluster - 1];
|
||||
MonitorServer* node_list[is_cluster - 1];
|
||||
/* Donor list size = DONOR_LIST_SET_VAR + n_hosts * max_host_len + n_hosts + 1 */
|
||||
|
||||
char* donor_list = static_cast<char*>(MXS_CALLOC(1,
|
||||
@ -520,7 +520,7 @@ void GaleraMonitor::update_sst_donor_nodes(int is_cluster)
|
||||
{
|
||||
if ((ptr->pending_status & SERVER_JOINED) && (ptr->pending_status & SERVER_SLAVE))
|
||||
{
|
||||
node_list[found_slaves] = (MXS_MONITORED_SERVER*)ptr;
|
||||
node_list[found_slaves] = (MonitorServer*)ptr;
|
||||
found_slaves++;
|
||||
|
||||
/* Check the server parameter "priority"
|
||||
@ -541,13 +541,13 @@ void GaleraMonitor::update_sst_donor_nodes(int is_cluster)
|
||||
/* Sort the array */
|
||||
qsort(node_list,
|
||||
found_slaves,
|
||||
sizeof(MXS_MONITORED_SERVER*),
|
||||
sizeof(MonitorServer*),
|
||||
sort_order ? compare_node_priority : compare_node_index);
|
||||
|
||||
/* Select nodename from each server and append it to node_list */
|
||||
for (unsigned int k = 0; k < found_slaves; k++)
|
||||
{
|
||||
MXS_MONITORED_SERVER* ptr = node_list[k];
|
||||
MonitorServer* ptr = node_list[k];
|
||||
|
||||
/* Get the Galera node name */
|
||||
if (mxs_mysql_query(ptr->con, "SHOW VARIABLES LIKE 'wsrep_node_name'") == 0
|
||||
@ -586,7 +586,7 @@ void GaleraMonitor::update_sst_donor_nodes(int is_cluster)
|
||||
/* Set now rep_sst_donor in each slave node */
|
||||
for (unsigned int k = 0; k < found_slaves; k++)
|
||||
{
|
||||
MXS_MONITORED_SERVER* ptr = node_list[k];
|
||||
MonitorServer* ptr = node_list[k];
|
||||
if (mxs_mysql_query(ptr->con, donor_list) != 0)
|
||||
{
|
||||
ptr->mon_report_query_error();
|
||||
@ -611,8 +611,8 @@ void GaleraMonitor::update_sst_donor_nodes(int is_cluster)
|
||||
|
||||
static int compare_node_index(const void* a, const void* b)
|
||||
{
|
||||
const MXS_MONITORED_SERVER* s_a = *(MXS_MONITORED_SERVER* const*)a;
|
||||
const MXS_MONITORED_SERVER* s_b = *(MXS_MONITORED_SERVER* const*)b;
|
||||
const MonitorServer* s_a = *(MonitorServer* const*)a;
|
||||
const MonitorServer* s_b = *(MonitorServer* const*)b;
|
||||
|
||||
// Order is DESC: b - a
|
||||
return s_b->server->node_id - s_a->server->node_id;
|
||||
@ -639,8 +639,8 @@ static int compare_node_index(const void* a, const void* b)
|
||||
|
||||
static int compare_node_priority(const void* a, const void* b)
|
||||
{
|
||||
const MXS_MONITORED_SERVER* s_a = *(MXS_MONITORED_SERVER* const*)a;
|
||||
const MXS_MONITORED_SERVER* s_b = *(MXS_MONITORED_SERVER* const*)b;
|
||||
const MonitorServer* s_a = *(MonitorServer* const*)a;
|
||||
const MonitorServer* s_b = *(MonitorServer* const*)b;
|
||||
std::string pri_a = s_a->server->get_custom_parameter("priority");
|
||||
std::string pri_b = s_b->server->get_custom_parameter("priority");
|
||||
bool have_a = !pri_a.empty();
|
||||
|
||||
@ -32,7 +32,7 @@ struct GaleraNode
|
||||
std::string cluster_uuid; /**< Cluster UUID */
|
||||
};
|
||||
|
||||
typedef std::unordered_map<mxs::MXS_MONITORED_SERVER*, GaleraNode> NodeMap;
|
||||
typedef std::unordered_map<mxs::MonitorServer*, GaleraNode> NodeMap;
|
||||
|
||||
class GaleraMonitor : public maxscale::MonitorWorkerSimple
|
||||
{
|
||||
@ -48,7 +48,7 @@ public:
|
||||
protected:
|
||||
bool configure(const MXS_CONFIG_PARAMETER* param);
|
||||
bool has_sufficient_permissions();
|
||||
void update_server_status(mxs::MXS_MONITORED_SERVER* monitored_server);
|
||||
void update_server_status(mxs::MonitorServer* monitored_server);
|
||||
void pre_tick();
|
||||
void post_tick();
|
||||
|
||||
@ -71,7 +71,7 @@ private:
|
||||
bool detect_cluster_size(const int n_nodes,
|
||||
const char* candidate_uuid,
|
||||
const int candidate_size);
|
||||
mxs::MXS_MONITORED_SERVER* get_candidate_master();
|
||||
mxs::MonitorServer* get_candidate_master();
|
||||
void set_galera_cluster();
|
||||
void update_sst_donor_nodes(int is_cluster);
|
||||
};
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include <maxscale/protocol/mysql.hh>
|
||||
#include <mysqld_error.h>
|
||||
|
||||
using maxscale::MXS_MONITORED_SERVER;
|
||||
using maxscale::MonitorServer;
|
||||
|
||||
GRMon::GRMon(const std::string& name, const std::string& module)
|
||||
: MonitorWorkerSimple(name, module)
|
||||
@ -54,7 +54,7 @@ static inline bool is_false(const char* value)
|
||||
|| strcasecmp(value, "false") == 0;
|
||||
}
|
||||
|
||||
static bool is_master(MXS_MONITORED_SERVER* server)
|
||||
static bool is_master(MonitorServer* server)
|
||||
{
|
||||
bool rval = false;
|
||||
MYSQL_RES* result;
|
||||
@ -81,7 +81,7 @@ static bool is_master(MXS_MONITORED_SERVER* server)
|
||||
return rval;
|
||||
}
|
||||
|
||||
static bool is_slave(MXS_MONITORED_SERVER* server)
|
||||
static bool is_slave(MonitorServer* server)
|
||||
{
|
||||
bool rval = false;
|
||||
MYSQL_RES* result;
|
||||
@ -108,7 +108,7 @@ static bool is_slave(MXS_MONITORED_SERVER* server)
|
||||
return rval;
|
||||
}
|
||||
|
||||
void GRMon::update_server_status(MXS_MONITORED_SERVER* monitored_server)
|
||||
void GRMon::update_server_status(MonitorServer* monitored_server)
|
||||
{
|
||||
if (is_master(monitored_server))
|
||||
{
|
||||
|
||||
@ -30,7 +30,7 @@ public:
|
||||
|
||||
protected:
|
||||
bool has_sufficient_permissions();
|
||||
void update_server_status(mxs::MXS_MONITORED_SERVER* monitored_server);
|
||||
void update_server_status(mxs::MonitorServer* monitored_server);
|
||||
|
||||
private:
|
||||
GRMon(const std::string& name, const std::string& module);
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
using std::string;
|
||||
using maxbase::string_printf;
|
||||
using maxscale::Monitor;
|
||||
using maxscale::MXS_MONITORED_SERVER;
|
||||
using maxscale::MonitorServer;
|
||||
|
||||
// Config parameter names
|
||||
const char* const CN_AUTO_FAILOVER = "auto_failover";
|
||||
@ -134,7 +134,7 @@ MariaDBServer* MariaDBMonitor::get_server(int64_t id)
|
||||
return (found != m_servers_by_id.end()) ? (*found).second : NULL;
|
||||
}
|
||||
|
||||
MariaDBServer* MariaDBMonitor::get_server(MXS_MONITORED_SERVER* mon_server)
|
||||
MariaDBServer* MariaDBMonitor::get_server(MonitorServer* mon_server)
|
||||
{
|
||||
return get_server(mon_server->server);
|
||||
}
|
||||
@ -336,7 +336,7 @@ json_t* MariaDBMonitor::to_json() const
|
||||
*/
|
||||
void MariaDBMonitor::update_server(MariaDBServer* server)
|
||||
{
|
||||
MXS_MONITORED_SERVER* mon_srv = server->m_server_base;
|
||||
MonitorServer* mon_srv = server->m_server_base;
|
||||
mxs_connect_result_t conn_status = mon_srv->ping_or_connect(m_settings.conn_settings);
|
||||
MYSQL* conn = mon_srv->con; // mon_ping_or_connect_to_db() may have reallocated the MYSQL struct.
|
||||
|
||||
@ -423,7 +423,7 @@ void MariaDBMonitor::pre_loop()
|
||||
|
||||
void MariaDBMonitor::tick()
|
||||
{
|
||||
/* Update MXS_MONITORED_SERVER->pending_status. This is where the monitor loop writes it's findings.
|
||||
/* Update MonitorServer->pending_status. This is where the monitor loop writes it's findings.
|
||||
* Also, backup current status so that it can be compared to any deduced state. */
|
||||
for (auto srv : m_servers)
|
||||
{
|
||||
@ -636,7 +636,7 @@ void MariaDBMonitor::update_external_master()
|
||||
|
||||
void MariaDBMonitor::log_master_changes()
|
||||
{
|
||||
MXS_MONITORED_SERVER* root_master = m_master ? m_master->m_server_base : NULL;
|
||||
MonitorServer* root_master = m_master ? m_master->m_server_base : NULL;
|
||||
if (root_master && root_master->status_changed()
|
||||
&& !(root_master->pending_status & SERVER_WAS_MASTER))
|
||||
{
|
||||
|
||||
@ -251,7 +251,7 @@ private:
|
||||
|
||||
MariaDBServer* get_server(const std::string& host, int port);
|
||||
MariaDBServer* get_server(int64_t id);
|
||||
MariaDBServer* get_server(mxs::MXS_MONITORED_SERVER* mon_server);
|
||||
MariaDBServer* get_server(mxs::MonitorServer* mon_server);
|
||||
MariaDBServer* get_server(SERVER* server);
|
||||
|
||||
// Cluster discovery and status assignment methods, top levels
|
||||
|
||||
@ -28,9 +28,9 @@ using maxbase::Duration;
|
||||
using maxbase::StopWatch;
|
||||
using maxsql::QueryResult;
|
||||
using Guard = std::lock_guard<std::mutex>;
|
||||
using maxscale::MXS_MONITORED_SERVER;
|
||||
using maxscale::MonitorServer;
|
||||
|
||||
MariaDBServer::MariaDBServer(MXS_MONITORED_SERVER* monitored_server, int config_index,
|
||||
MariaDBServer::MariaDBServer(MonitorServer* monitored_server, int config_index,
|
||||
bool assume_unique_hostnames, bool query_events)
|
||||
: m_server_base(monitored_server)
|
||||
, m_config_index(config_index)
|
||||
|
||||
@ -73,7 +73,7 @@ struct NodeData
|
||||
class MariaDBServer
|
||||
{
|
||||
public:
|
||||
MariaDBServer(mxs::MXS_MONITORED_SERVER* monitored_server, int config_index,
|
||||
MariaDBServer(mxs::MonitorServer* monitored_server, int config_index,
|
||||
bool assume_unique_hostnames, bool query_events);
|
||||
|
||||
class EventInfo
|
||||
@ -119,7 +119,7 @@ public:
|
||||
|
||||
/* Monitored server base class/struct. MariaDBServer does not own the struct, it is not freed
|
||||
* (or connection closed) when a MariaDBServer is destroyed. */
|
||||
mxs::MXS_MONITORED_SERVER* m_server_base = NULL;
|
||||
mxs::MonitorServer* m_server_base = NULL;
|
||||
/* What position this server has in the monitor config? Used for tiebreaking between servers. */
|
||||
int m_config_index = 0;
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
using std::string;
|
||||
using std::cout;
|
||||
using maxscale::MXS_MONITORED_SERVER;
|
||||
using maxscale::MonitorServer;
|
||||
|
||||
// Maximum sizes for array types
|
||||
const int MAX_CYCLE_SIZE = 10;
|
||||
@ -159,7 +159,7 @@ void MariaDBMonitor::Test::init_servers(int count)
|
||||
{
|
||||
// Server contents mostly undefined
|
||||
auto base_server = Server::create_test_server();
|
||||
MXS_MONITORED_SERVER* mon_server = new MXS_MONITORED_SERVER(base_server);
|
||||
MonitorServer* mon_server = new MonitorServer(base_server);
|
||||
MariaDBServer* mariadb_server = new MariaDBServer(mon_server, i - 1, m_use_hostnames, true);
|
||||
|
||||
if (m_use_hostnames)
|
||||
|
||||
@ -42,7 +42,7 @@ bool NDBCMonitor::has_sufficient_permissions()
|
||||
return test_permissions("SHOW STATUS LIKE 'Ndb_number_of_ready_data_nodes'");
|
||||
}
|
||||
|
||||
void NDBCMonitor::update_server_status(mxs::MXS_MONITORED_SERVER* monitored_server)
|
||||
void NDBCMonitor::update_server_status(mxs::MonitorServer* monitored_server)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
MYSQL_RES* result;
|
||||
|
||||
@ -30,7 +30,7 @@ public:
|
||||
|
||||
protected:
|
||||
bool has_sufficient_permissions();
|
||||
void update_server_status(mxs::MXS_MONITORED_SERVER* monitored_server);
|
||||
void update_server_status(mxs::MonitorServer* monitored_server);
|
||||
|
||||
private:
|
||||
NDBCMonitor(const std::string& name, const std::string& module);
|
||||
|
||||
Reference in New Issue
Block a user