Added missing spinlock calls to all monitors.
This commit is contained in:
parent
7dbc021149
commit
91bc7b2792
@ -133,8 +133,10 @@ MONITOR *ptr;
|
||||
void
|
||||
monitorStart(MONITOR *monitor, void* params)
|
||||
{
|
||||
spinlock_acquire(&monitor->lock);
|
||||
monitor->handle = (*monitor->module->startMonitor)(monitor,params);
|
||||
monitor->state = MONITOR_STATE_RUNNING;
|
||||
spinlock_release(&monitor->lock);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -405,15 +405,19 @@ static void
|
||||
monitorMain(void *arg)
|
||||
{
|
||||
MONITOR* mon = (MONITOR*)arg;
|
||||
GALERA_MONITOR *handle = (GALERA_MONITOR *)mon->handle;
|
||||
GALERA_MONITOR *handle;
|
||||
MONITOR_SERVERS *ptr;
|
||||
size_t nrounds = 0;
|
||||
MONITOR_SERVERS *candidate_master = NULL;
|
||||
int master_stickiness = handle->disableMasterFailback;
|
||||
int master_stickiness;
|
||||
int is_cluster=0;
|
||||
int log_no_members = 1;
|
||||
monitor_event_t evtype;
|
||||
|
||||
spinlock_acquire(&mon->lock);
|
||||
handle = (GALERA_MONITOR *)mon->handle;
|
||||
spinlock_release(&mon->lock);
|
||||
master_stickiness = handle->disableMasterFailback;
|
||||
if (mysql_thread_init())
|
||||
{
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
|
@ -494,12 +494,17 @@ static void
|
||||
monitorMain(void *arg)
|
||||
{
|
||||
MONITOR* mon = (MONITOR*)arg;
|
||||
MM_MONITOR *handle = (MM_MONITOR *)mon->handle;
|
||||
MM_MONITOR *handle;
|
||||
MONITOR_SERVERS *ptr;
|
||||
int detect_stale_master = handle->detectStaleMaster;
|
||||
int detect_stale_master;
|
||||
MONITOR_SERVERS *root_master;
|
||||
size_t nrounds = 0;
|
||||
|
||||
spinlock_acquire(&mon->lock);
|
||||
handle = (MM_MONITOR *)mon->handle;
|
||||
spinlock_release(&mon->lock);
|
||||
detect_stale_master = handle->detectStaleMaster;
|
||||
|
||||
if (mysql_thread_init())
|
||||
{
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
|
@ -507,15 +507,21 @@ static void
|
||||
monitorMain(void *arg)
|
||||
{
|
||||
MONITOR* mon = (MONITOR*) arg;
|
||||
MYSQL_MONITOR *handle = (MYSQL_MONITOR *)mon->handle;
|
||||
MYSQL_MONITOR *handle;
|
||||
MONITOR_SERVERS *ptr;
|
||||
int replication_heartbeat = handle->replicationHeartbeat;
|
||||
int detect_stale_master = handle->detectStaleMaster;
|
||||
int replication_heartbeat;
|
||||
int detect_stale_master;
|
||||
int num_servers=0;
|
||||
MONITOR_SERVERS *root_master = NULL;
|
||||
size_t nrounds = 0;
|
||||
int log_no_master = 1;
|
||||
|
||||
spinlock_acquire(&mon->lock);
|
||||
handle = (MYSQL_MONITOR *)mon->handle;
|
||||
spinlock_release(&mon->lock);
|
||||
replication_heartbeat = handle->replicationHeartbeat;
|
||||
detect_stale_master = handle->detectStaleMaster;
|
||||
|
||||
if (mysql_thread_init())
|
||||
{
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
|
@ -346,10 +346,14 @@ static void
|
||||
monitorMain(void *arg)
|
||||
{
|
||||
MONITOR* mon = arg;
|
||||
MYSQL_MONITOR *handle = (MYSQL_MONITOR *)mon->handle;
|
||||
MYSQL_MONITOR *handle;
|
||||
MONITOR_SERVERS *ptr;
|
||||
size_t nrounds = 0;
|
||||
|
||||
spinlock_acquire(&mon->lock);
|
||||
handle = (MYSQL_MONITOR *)mon->handle;
|
||||
spinlock_release(&mon->lock);
|
||||
|
||||
if (mysql_thread_init())
|
||||
{
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
|
Loading…
x
Reference in New Issue
Block a user