poll.c:poll_add_event_to_dcb did not increase the pollStats.evq_pending counter which caused it to go negative, which, inturn caused all threads to spinloop with minimal timeout.
This commit is contained in:
@ -1461,21 +1461,24 @@ SERVER *server;
|
||||
|
||||
if (!succp)
|
||||
{
|
||||
if(param){
|
||||
LOGIF(LM, (skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"* Warning : invalid value type "
|
||||
"for parameter \'%s.%s = %s\'\n\tExpected "
|
||||
"type is <int> for maximum "
|
||||
"slave replication lag.",
|
||||
((SERVICE*)obj->element)->name,
|
||||
param->name,
|
||||
param->value)));
|
||||
}else{
|
||||
LOGIF(LE, (skygw_log_write(
|
||||
LOGFILE_ERROR,
|
||||
"Error : parameter was NULL")));
|
||||
}
|
||||
if(param)
|
||||
{
|
||||
LOGIF(LM, (skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"* Warning : invalid value type "
|
||||
"for parameter \'%s.%s = %s\'\n\tExpected "
|
||||
"type is <int> for maximum "
|
||||
"slave replication lag.",
|
||||
((SERVICE*)obj->element)->name,
|
||||
param->name,
|
||||
param->value)));
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGIF(LE, (skygw_log_write(
|
||||
LOGFILE_ERROR,
|
||||
"Error : parameter was NULL")));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1493,7 +1496,8 @@ SERVER *server;
|
||||
config_get_value(obj->parameters,
|
||||
"enable_root_user");
|
||||
allow_localhost_match_wildcard_host =
|
||||
config_get_value(obj->parameters, "localhost_match_wildcard_host");
|
||||
config_get_value(obj->parameters,
|
||||
"localhost_match_wildcard_host");
|
||||
|
||||
user = config_get_value(obj->parameters,
|
||||
"user");
|
||||
@ -1508,7 +1512,8 @@ SERVER *server;
|
||||
user,
|
||||
auth);
|
||||
if (enable_root_user)
|
||||
serviceEnableRootUser(obj->element, atoi(enable_root_user));
|
||||
serviceEnableRootUser(obj->element,
|
||||
atoi(enable_root_user));
|
||||
|
||||
if (allow_localhost_match_wildcard_host)
|
||||
serviceEnableLocalhostMatchWildcardHost(
|
||||
@ -1516,7 +1521,7 @@ SERVER *server;
|
||||
atoi(allow_localhost_match_wildcard_host));
|
||||
}
|
||||
}
|
||||
}
|
||||
} /*< if router */
|
||||
else
|
||||
{
|
||||
obj->element = NULL;
|
||||
|
@ -717,6 +717,7 @@ unsigned long qtime;
|
||||
dcb->evq.processing_events = ev;
|
||||
dcb->evq.pending_events = 0;
|
||||
pollStats.evq_pending--;
|
||||
ss_dassert(pollStats.evq_pending >= 0);
|
||||
}
|
||||
spinlock_release(&pollqlock);
|
||||
|
||||
@ -1338,6 +1339,10 @@ static void poll_add_event_to_dcb(
|
||||
/** Set event to DCB */
|
||||
if (DCB_POLL_BUSY(dcb))
|
||||
{
|
||||
if (dcb->evq.pending_events == 0)
|
||||
{
|
||||
pollStats.evq_pending++;
|
||||
}
|
||||
dcb->evq.pending_events |= ev;
|
||||
}
|
||||
else
|
||||
@ -1358,6 +1363,8 @@ static void poll_add_event_to_dcb(
|
||||
dcb->evq.next = dcb;
|
||||
}
|
||||
pollStats.evq_length++;
|
||||
pollStats.evq_pending++;
|
||||
|
||||
if (pollStats.evq_length > pollStats.evq_max)
|
||||
{
|
||||
pollStats.evq_max = pollStats.evq_length;
|
||||
|
Reference in New Issue
Block a user