Merge branch 'monitor_refactoring' into develop
This commit is contained in:
commit
d5d5bd5016
@ -118,6 +118,7 @@ include_directories(utils)
|
||||
include_directories(log_manager)
|
||||
include_directories(query_classifier)
|
||||
include_directories(server/include)
|
||||
include_directories(server/include/maxscale)
|
||||
include_directories(server/inih)
|
||||
include_directories(server/modules/include)
|
||||
include_directories(${CMAKE_BINARY_DIR}/server/include)
|
||||
|
@ -51,7 +51,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <ini.h>
|
||||
#include <config.h>
|
||||
#include <maxconfig.h>
|
||||
#include <service.h>
|
||||
#include <server.h>
|
||||
#include <users.h>
|
||||
@ -93,7 +93,7 @@ static int internalService(char *router);
|
||||
int config_get_ifaddr(unsigned char *output);
|
||||
int config_get_release_string(char* release);
|
||||
FEEDBACK_CONF * config_get_feedback_data();
|
||||
|
||||
void config_add_param(CONFIG_CONTEXT*,char*,char*);
|
||||
static char *config_file = NULL;
|
||||
static GATEWAY_CONF gateway;
|
||||
static FEEDBACK_CONF feedback;
|
||||
@ -846,9 +846,6 @@ int error_count = 0;
|
||||
char *user;
|
||||
char *passwd;
|
||||
unsigned long interval = 0;
|
||||
int replication_heartbeat = 0;
|
||||
int detect_stale_master = 0;
|
||||
int disable_master_failback = 0;
|
||||
int connect_timeout = 0;
|
||||
int read_timeout = 0;
|
||||
int write_timeout = 0;
|
||||
@ -861,18 +858,6 @@ int error_count = 0;
|
||||
interval = strtoul(config_get_value(obj->parameters, "monitor_interval"), NULL, 10);
|
||||
}
|
||||
|
||||
if (config_get_value(obj->parameters, "detect_replication_lag")) {
|
||||
replication_heartbeat = atoi(config_get_value(obj->parameters, "detect_replication_lag"));
|
||||
}
|
||||
|
||||
if (config_get_value(obj->parameters, "detect_stale_master")) {
|
||||
detect_stale_master = atoi(config_get_value(obj->parameters, "detect_stale_master"));
|
||||
}
|
||||
|
||||
if (config_get_value(obj->parameters, "disable_master_failback")) {
|
||||
disable_master_failback = atoi(config_get_value(obj->parameters, "disable_master_failback"));
|
||||
}
|
||||
|
||||
if (config_get_value(obj->parameters, "backend_connect_timeout")) {
|
||||
connect_timeout = atoi(config_get_value(obj->parameters, "backend_connect_timeout"));
|
||||
}
|
||||
@ -895,25 +880,12 @@ int error_count = 0;
|
||||
gateway.id = getpid();
|
||||
}
|
||||
|
||||
/* add the maxscale-id to monitor data */
|
||||
monitorSetId(obj->element, gateway.id);
|
||||
monitorStart(obj->element,obj->parameters);
|
||||
|
||||
/* set monitor interval */
|
||||
if (interval > 0)
|
||||
monitorSetInterval(obj->element, interval);
|
||||
|
||||
/* set replication heartbeat */
|
||||
if(replication_heartbeat == 1)
|
||||
monitorSetReplicationHeartbeat(obj->element, replication_heartbeat);
|
||||
|
||||
/* detect stale master */
|
||||
if(detect_stale_master == 1)
|
||||
monitorDetectStaleMaster(obj->element, detect_stale_master);
|
||||
|
||||
/* disable master failback */
|
||||
if(disable_master_failback == 1)
|
||||
monitorDisableMasterFailback(obj->element, disable_master_failback);
|
||||
|
||||
/* set timeouts */
|
||||
if (connect_timeout > 0)
|
||||
monitorSetNetworkTimeout(obj->element, MONITOR_CONNECT_TIMEOUT, connect_timeout);
|
||||
@ -2257,3 +2229,23 @@ void
|
||||
config_disable_feedback_task(void) {
|
||||
hktask_remove("send_feedback");
|
||||
}
|
||||
|
||||
unsigned long config_get_gateway_id()
|
||||
{
|
||||
return gateway.id;
|
||||
}
|
||||
void config_add_param(CONFIG_CONTEXT* obj, char* key,char* value)
|
||||
{
|
||||
CONFIG_PARAMETER* nptr = malloc(sizeof(CONFIG_PARAMETER));
|
||||
|
||||
if(nptr == NULL)
|
||||
{
|
||||
skygw_log_write(LOGFILE_ERROR,"Memory allocation failed when adding configuration parameters");
|
||||
return;
|
||||
}
|
||||
|
||||
nptr->name = strdup(key);
|
||||
nptr->value = strdup(value);
|
||||
nptr->next = obj->parameters;
|
||||
obj->parameters = nptr;
|
||||
}
|
@ -53,7 +53,7 @@
|
||||
#include <dcb.h>
|
||||
#include <session.h>
|
||||
#include <modules.h>
|
||||
#include <config.h>
|
||||
#include <maxconfig.h>
|
||||
#include <poll.h>
|
||||
#include <housekeeper.h>
|
||||
#include <service.h>
|
||||
|
@ -78,8 +78,10 @@ MONITOR *mon;
|
||||
free(mon);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
mon->handle = (*mon->module->startMonitor)(NULL);
|
||||
mon->state = MONITOR_STATE_RUNNING;
|
||||
*/
|
||||
|
||||
spinlock_acquire(&monLock);
|
||||
mon->next = allMonitors;
|
||||
@ -125,9 +127,9 @@ MONITOR *ptr;
|
||||
* @param monitor The Monitor that should be started
|
||||
*/
|
||||
void
|
||||
monitorStart(MONITOR *monitor)
|
||||
monitorStart(MONITOR *monitor, void* params)
|
||||
{
|
||||
monitor->handle = (*monitor->module->startMonitor)(monitor->handle);
|
||||
monitor->handle = (*monitor->module->startMonitor)(monitor->handle,params);
|
||||
monitor->state = MONITOR_STATE_RUNNING;
|
||||
}
|
||||
|
||||
@ -279,22 +281,6 @@ MONITOR *ptr;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the id of the monitor.
|
||||
*
|
||||
* @param mon The monitor instance
|
||||
* @param id The id for the monitor
|
||||
*/
|
||||
|
||||
void
|
||||
monitorSetId(MONITOR *mon, unsigned long id)
|
||||
{
|
||||
if (mon->module->defaultId != NULL) {
|
||||
mon->module->defaultId(mon->handle, id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the monitor sampling interval.
|
||||
*
|
||||
@ -310,48 +296,6 @@ monitorSetInterval (MONITOR *mon, unsigned long interval)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable Replication Heartbeat support in monitor.
|
||||
*
|
||||
* @param mon The monitor instance
|
||||
* @param enable The enabling value is 1, 0 turns it off
|
||||
*/
|
||||
void
|
||||
monitorSetReplicationHeartbeat(MONITOR *mon, int enable)
|
||||
{
|
||||
if (mon->module->replicationHeartbeat != NULL) {
|
||||
mon->module->replicationHeartbeat(mon->handle, enable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable Stale Master assignement.
|
||||
*
|
||||
* @param mon The monitor instance
|
||||
* @param enable The enabling value is 1, 0 turns it off
|
||||
*/
|
||||
void
|
||||
monitorDetectStaleMaster(MONITOR *mon, int enable)
|
||||
{
|
||||
if (mon->module->detectStaleMaster != NULL) {
|
||||
mon->module->detectStaleMaster(mon->handle, enable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable Master Failback
|
||||
*
|
||||
* @param mon The monitor instance
|
||||
* @param disable The value 1 disable the failback, 0 keeps it
|
||||
*/
|
||||
void
|
||||
monitorDisableMasterFailback(MONITOR *mon, int disable)
|
||||
{
|
||||
if (mon->module->disableMasterFailback != NULL) {
|
||||
mon->module->disableMasterFailback(mon->handle, disable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Monitor timeouts for connect/read/write
|
||||
*
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <skygw_utils.h>
|
||||
#include <log_manager.h>
|
||||
#include <gw.h>
|
||||
#include <config.h>
|
||||
#include <maxconfig.h>
|
||||
#include <housekeeper.h>
|
||||
#include <config.h>
|
||||
#include <mysql.h>
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "../../include/hashtable.h"
|
||||
#include <hashtable.h>
|
||||
|
||||
static void
|
||||
read_lock(HASHTABLE *table)
|
||||
|
@ -141,4 +141,5 @@ bool config_get_valtarget(
|
||||
|
||||
void config_enable_feedback_task(void);
|
||||
void config_disable_feedback_task(void);
|
||||
unsigned long config_get_gateway_id(void);
|
||||
#endif
|
@ -67,7 +67,7 @@
|
||||
* monitored.
|
||||
*/
|
||||
typedef struct {
|
||||
void *(*startMonitor)(void *);
|
||||
void *(*startMonitor)(void *, void*);
|
||||
void (*stopMonitor)(void *);
|
||||
void (*registerServer)(void *, SERVER *);
|
||||
void (*unregisterServer)(void *, SERVER *);
|
||||
@ -75,17 +75,13 @@ typedef struct {
|
||||
void (*diagnostics)(DCB *, void *);
|
||||
void (*setInterval)(void *, size_t);
|
||||
void (*setNetworkTimeout)(void *, int, int);
|
||||
void (*defaultId)(void *, unsigned long);
|
||||
void (*replicationHeartbeat)(void *, int);
|
||||
void (*detectStaleMaster)(void *, int);
|
||||
void (*disableMasterFailback)(void *, int);
|
||||
} MONITOR_OBJECT;
|
||||
|
||||
/**
|
||||
* The monitor API version number. Any change to the monitor module API
|
||||
* must change these versions usign the rules defined in modinfo.h
|
||||
*/
|
||||
#define MONITOR_VERSION {1, 0, 0}
|
||||
#define MONITOR_VERSION {2, 0, 0}
|
||||
|
||||
/** Monitor's poll frequency */
|
||||
#define MON_BASE_INTERVAL_MS 100
|
||||
@ -134,16 +130,12 @@ extern MONITOR *monitor_find(char *);
|
||||
extern void monitorAddServer(MONITOR *, SERVER *);
|
||||
extern void monitorAddUser(MONITOR *, char *, char *);
|
||||
extern void monitorStop(MONITOR *);
|
||||
extern void monitorStart(MONITOR *);
|
||||
extern void monitorStart(MONITOR *, void*);
|
||||
extern void monitorStopAll();
|
||||
extern void monitorShowAll(DCB *);
|
||||
extern void monitorShow(DCB *, MONITOR *);
|
||||
extern void monitorList(DCB *);
|
||||
extern void monitorSetId(MONITOR *, unsigned long);
|
||||
extern void monitorSetInterval (MONITOR *, unsigned long);
|
||||
extern void monitorSetReplicationHeartbeat(MONITOR *, int);
|
||||
extern void monitorDetectStaleMaster(MONITOR *, int);
|
||||
extern void monitorDisableMasterFailback(MONITOR *, int);
|
||||
extern void monitorSetNetworkTimeout(MONITOR *, int, int);
|
||||
extern RESULTSET *monitorGetList();
|
||||
#endif
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <filter.h>
|
||||
#include <hashtable.h>
|
||||
#include <resultset.h>
|
||||
#include "config.h"
|
||||
#include <maxconfig.h>
|
||||
|
||||
/**
|
||||
* @file service.h
|
||||
@ -182,6 +182,8 @@ extern int serviceSetTimeout(SERVICE *, int );
|
||||
extern void serviceWeightBy(SERVICE *, char *);
|
||||
extern char *serviceGetWeightingParameter(SERVICE *);
|
||||
extern int serviceEnableLocalhostMatchWildcardHost(SERVICE *, int);
|
||||
int serviceStripDbEsc(SERVICE* service, int action);
|
||||
int serviceAuthAllServers(SERVICE *service, int action);
|
||||
extern void service_update(SERVICE *, char *, char *, char *);
|
||||
extern int service_refresh_users(SERVICE *);
|
||||
extern void printService(SERVICE *);
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include <secrets.h>
|
||||
#include <dcb.h>
|
||||
#include <modinfo.h>
|
||||
#include <maxconfig.h>
|
||||
|
||||
/** Defined in log_manager.cc */
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
@ -66,7 +67,7 @@ MODULE_INFO info = {
|
||||
"A Galera cluster monitor"
|
||||
};
|
||||
|
||||
static void *startMonitor(void *);
|
||||
static void *startMonitor(void *,void*);
|
||||
static void stopMonitor(void *);
|
||||
static void registerServer(void *, SERVER *);
|
||||
static void unregisterServer(void *, SERVER *);
|
||||
@ -88,11 +89,7 @@ static MONITOR_OBJECT MyObject = {
|
||||
defaultUsers,
|
||||
diagnostics,
|
||||
setInterval,
|
||||
setNetworkTimeout,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
disableMasterFailback
|
||||
setNetworkTimeout
|
||||
};
|
||||
|
||||
/**
|
||||
@ -141,10 +138,10 @@ GetModuleObject()
|
||||
* @return A handle to use when interacting with the monitor
|
||||
*/
|
||||
static void *
|
||||
startMonitor(void *arg)
|
||||
startMonitor(void *arg,void* opt)
|
||||
{
|
||||
MYSQL_MONITOR *handle;
|
||||
|
||||
CONFIG_PARAMETER* params = (CONFIG_PARAMETER*)opt;
|
||||
if (arg != NULL)
|
||||
{
|
||||
handle = (MYSQL_MONITOR *)arg;
|
||||
@ -167,6 +164,15 @@ MYSQL_MONITOR *handle;
|
||||
handle->write_timeout=DEFAULT_WRITE_TIMEOUT;
|
||||
spinlock_init(&handle->lock);
|
||||
}
|
||||
|
||||
|
||||
while(params)
|
||||
{
|
||||
if(!strcmp(params->name,"disable_master_failback"))
|
||||
handle->disableMasterFailback = config_truth_value(params->value);
|
||||
params = params->next;
|
||||
}
|
||||
|
||||
handle->tid = (THREAD)thread_start(monitorMain, handle);
|
||||
return handle;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <secrets.h>
|
||||
#include <dcb.h>
|
||||
#include <modinfo.h>
|
||||
|
||||
#include <maxconfig.h>
|
||||
/** Defined in log_manager.cc */
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
extern size_t log_ses_count[];
|
||||
@ -58,7 +58,7 @@ MODULE_INFO info = {
|
||||
"A MySQL Multi Master monitor"
|
||||
};
|
||||
|
||||
static void *startMonitor(void *);
|
||||
static void *startMonitor(void *,void*);
|
||||
static void stopMonitor(void *);
|
||||
static void registerServer(void *, SERVER *);
|
||||
static void unregisterServer(void *, SERVER *);
|
||||
@ -79,12 +79,7 @@ static MONITOR_OBJECT MyObject = {
|
||||
unregisterServer,
|
||||
defaultUser,
|
||||
diagnostics,
|
||||
setInterval,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
detectStaleMaster,
|
||||
NULL
|
||||
setInterval
|
||||
};
|
||||
|
||||
/**
|
||||
@ -134,10 +129,10 @@ GetModuleObject()
|
||||
* @return A handle to use when interacting with the monitor
|
||||
*/
|
||||
static void *
|
||||
startMonitor(void *arg)
|
||||
startMonitor(void *arg,void* opt)
|
||||
{
|
||||
MYSQL_MONITOR *handle;
|
||||
|
||||
CONFIG_PARAMETER* params = (CONFIG_PARAMETER*)opt;
|
||||
if (arg)
|
||||
{
|
||||
handle = arg; /* Must be a restart */
|
||||
@ -158,6 +153,14 @@ MYSQL_MONITOR *handle;
|
||||
handle->master = NULL;
|
||||
spinlock_init(&handle->lock);
|
||||
}
|
||||
|
||||
while(params)
|
||||
{
|
||||
if(!strcmp(params->name,"detect_stale_master"))
|
||||
handle->detectStaleMaster = config_truth_value(params->value);
|
||||
params = params->next;
|
||||
}
|
||||
|
||||
handle->tid = (THREAD)thread_start(monitorMain, handle);
|
||||
return handle;
|
||||
}
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include <secrets.h>
|
||||
#include <dcb.h>
|
||||
#include <modinfo.h>
|
||||
#include <maxconfig.h>
|
||||
|
||||
/** Defined in log_manager.cc */
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
@ -80,7 +81,7 @@ MODULE_INFO info = {
|
||||
"A MySQL Master/Slave replication monitor"
|
||||
};
|
||||
|
||||
static void *startMonitor(void *);
|
||||
static void *startMonitor(void *,void*);
|
||||
static void stopMonitor(void *);
|
||||
static void registerServer(void *, SERVER *);
|
||||
static void unregisterServer(void *, SERVER *);
|
||||
@ -88,8 +89,6 @@ static void defaultUser(void *, char *, char *);
|
||||
static void diagnostics(DCB *, void *);
|
||||
static void setInterval(void *, size_t);
|
||||
static void defaultId(void *, unsigned long);
|
||||
static void replicationHeartbeat(void *, int);
|
||||
static void detectStaleMaster(void *, int);
|
||||
static void setNetworkTimeout(void *, int, int);
|
||||
static bool mon_status_changed(MONITOR_SERVERS* mon_srv);
|
||||
static bool mon_print_fail_status(MONITOR_SERVERS* mon_srv);
|
||||
@ -110,11 +109,7 @@ static MONITOR_OBJECT MyObject = {
|
||||
defaultUser,
|
||||
diagnostics,
|
||||
setInterval,
|
||||
setNetworkTimeout,
|
||||
defaultId,
|
||||
replicationHeartbeat,
|
||||
detectStaleMaster,
|
||||
NULL
|
||||
setNetworkTimeout
|
||||
};
|
||||
|
||||
/**
|
||||
@ -164,10 +159,10 @@ GetModuleObject()
|
||||
* @return A handle to use when interacting with the monitor
|
||||
*/
|
||||
static void *
|
||||
startMonitor(void *arg)
|
||||
startMonitor(void *arg, void* opt)
|
||||
{
|
||||
MYSQL_MONITOR *handle;
|
||||
|
||||
CONFIG_PARAMETER* params = (CONFIG_PARAMETER*)opt;
|
||||
if (arg)
|
||||
{
|
||||
handle = arg; /* Must be a restart */
|
||||
@ -181,7 +176,7 @@ MYSQL_MONITOR *handle;
|
||||
handle->shutdown = 0;
|
||||
handle->defaultUser = NULL;
|
||||
handle->defaultPasswd = NULL;
|
||||
handle->id = MONITOR_DEFAULT_ID;
|
||||
handle->id = config_get_gateway_id();
|
||||
handle->interval = MONITOR_INTERVAL;
|
||||
handle->replicationHeartbeat = 0;
|
||||
handle->detectStaleMaster = 0;
|
||||
@ -191,6 +186,16 @@ MYSQL_MONITOR *handle;
|
||||
handle->write_timeout=DEFAULT_WRITE_TIMEOUT;
|
||||
spinlock_init(&handle->lock);
|
||||
}
|
||||
|
||||
while(params)
|
||||
{
|
||||
if(!strcmp(params->name,"detect_stale_master"))
|
||||
handle->detectStaleMaster = config_truth_value(params->value);
|
||||
else if(!strcmp(params->name,"detect_replication_lag"))
|
||||
handle->replicationHeartbeat = config_truth_value(params->value);
|
||||
params = params->next;
|
||||
}
|
||||
|
||||
handle->tid = (THREAD)thread_start(monitorMain, handle);
|
||||
return handle;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <secrets.h>
|
||||
#include <dcb.h>
|
||||
#include <modinfo.h>
|
||||
|
||||
#include <maxconfig.h>
|
||||
/** Defined in log_manager.cc */
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
extern size_t log_ses_count[];
|
||||
@ -59,7 +59,7 @@ MODULE_INFO info = {
|
||||
"A MySQL cluster SQL node monitor"
|
||||
};
|
||||
|
||||
static void *startMonitor(void *);
|
||||
static void *startMonitor(void *,void*);
|
||||
static void stopMonitor(void *);
|
||||
static void registerServer(void *, SERVER *);
|
||||
static void unregisterServer(void *, SERVER *);
|
||||
@ -76,11 +76,7 @@ static MONITOR_OBJECT MyObject = {
|
||||
defaultUsers,
|
||||
diagnostics,
|
||||
setInterval,
|
||||
setNetworkTimeout,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
setNetworkTimeout
|
||||
};
|
||||
|
||||
/**
|
||||
@ -129,10 +125,10 @@ GetModuleObject()
|
||||
* @return A handle to use when interacting with the monitor
|
||||
*/
|
||||
static void *
|
||||
startMonitor(void *arg)
|
||||
startMonitor(void *arg,void* opt)
|
||||
{
|
||||
MYSQL_MONITOR *handle;
|
||||
|
||||
CONFIG_PARAMETER* params = (CONFIG_PARAMETER*)opt;
|
||||
if (arg != NULL)
|
||||
{
|
||||
handle = (MYSQL_MONITOR *)arg;
|
||||
@ -153,6 +149,7 @@ MYSQL_MONITOR *handle;
|
||||
handle->write_timeout=DEFAULT_WRITE_TIMEOUT;
|
||||
spinlock_init(&handle->lock);
|
||||
}
|
||||
|
||||
handle->tid = (THREAD)thread_start(monitorMain, handle);
|
||||
return handle;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@
|
||||
#include <poll.h>
|
||||
#include <users.h>
|
||||
#include <dbusers.h>
|
||||
#include <config.h>
|
||||
#include <maxconfig.h>
|
||||
#include <telnetd.h>
|
||||
#include <adminusers.h>
|
||||
#include <monitor.h>
|
||||
@ -1195,7 +1195,7 @@ shutdown_monitor(DCB *dcb, MONITOR *monitor)
|
||||
static void
|
||||
restart_monitor(DCB *dcb, MONITOR *monitor)
|
||||
{
|
||||
monitorStart(monitor);
|
||||
monitorStart(monitor, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1207,7 +1207,14 @@ restart_monitor(DCB *dcb, MONITOR *monitor)
|
||||
static void
|
||||
enable_monitor_replication_heartbeat(DCB *dcb, MONITOR *monitor)
|
||||
{
|
||||
monitorSetReplicationHeartbeat(monitor, 1);
|
||||
CONFIG_PARAMETER param;
|
||||
const char* name = "detect_replication_lag";
|
||||
const char* value = "1";
|
||||
param.name = (char*)name;
|
||||
param.value = (char*)value;
|
||||
param.next = NULL;
|
||||
monitorStop(monitor);
|
||||
monitorStart(monitor,¶m);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1219,7 +1226,14 @@ enable_monitor_replication_heartbeat(DCB *dcb, MONITOR *monitor)
|
||||
static void
|
||||
disable_monitor_replication_heartbeat(DCB *dcb, MONITOR *monitor)
|
||||
{
|
||||
monitorSetReplicationHeartbeat(monitor, 0);
|
||||
CONFIG_PARAMETER param;
|
||||
const char* name = "detect_replication_lag";
|
||||
const char* value = "0";
|
||||
param.name = (char*)name;
|
||||
param.value = (char*)value;
|
||||
param.next = NULL;
|
||||
monitorStop(monitor);
|
||||
monitorStart(monitor,¶m);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include <skygw_utils.h>
|
||||
#include <log_manager.h>
|
||||
#include <resultset.h>
|
||||
#include <config.h>
|
||||
#include <maxconfig.h>
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
extern size_t log_ses_count[];
|
||||
|
Loading…
x
Reference in New Issue
Block a user