Monitors waited monitor check interval time before checking backend servers for the first time. Removed wait for the first check.

Added extra debugging to query_classifier to assist in issue resolution regarding to optimized MaxScale builds and pthread_mutex_lock in sql/sql_class.h
This commit is contained in:
VilhoRaatikka
2014-09-24 12:03:04 +03:00
parent 2c0b549b58
commit 2b147a9ea4
4 changed files with 43 additions and 12 deletions

View File

@ -611,13 +611,15 @@ size_t nrounds = 0;
}
/** Wait base interval */
thread_millisleep(MON_BASE_INTERVAL_MS);
nrounds += 1;
/** If monitor interval time isn't consumed skip checks */
if ((nrounds*MON_BASE_INTERVAL_MS)%handle->interval != 0)
if (nrounds != 0 &&
(nrounds*MON_BASE_INTERVAL_MS)%handle->interval != 0)
{
nrounds += 1;
continue;
}
nrounds += 1;
/* reset num_servers */
num_servers = 0;