Merge remote-tracking branch 'origin/develop' into MXS-472a
This commit is contained in:
@ -9,7 +9,7 @@ macro(set_maxscale_version)
|
|||||||
|
|
||||||
# MaxScale version number
|
# MaxScale version number
|
||||||
set(MAXSCALE_VERSION_MAJOR "1")
|
set(MAXSCALE_VERSION_MAJOR "1")
|
||||||
set(MAXSCALE_VERSION_MINOR "2")
|
set(MAXSCALE_VERSION_MINOR "3")
|
||||||
set(MAXSCALE_VERSION_PATCH "0")
|
set(MAXSCALE_VERSION_PATCH "0")
|
||||||
set(MAXSCALE_VERSION_NUMERIC "${MAXSCALE_VERSION_MAJOR}.${MAXSCALE_VERSION_MINOR}.${MAXSCALE_VERSION_PATCH}")
|
set(MAXSCALE_VERSION_NUMERIC "${MAXSCALE_VERSION_MAJOR}.${MAXSCALE_VERSION_MINOR}.${MAXSCALE_VERSION_PATCH}")
|
||||||
set(MAXSCALE_VERSION "${MAXSCALE_VERSION_MAJOR}.${MAXSCALE_VERSION_MINOR}.${MAXSCALE_VERSION_PATCH}")
|
set(MAXSCALE_VERSION "${MAXSCALE_VERSION_MAJOR}.${MAXSCALE_VERSION_MINOR}.${MAXSCALE_VERSION_PATCH}")
|
||||||
|
|||||||
@ -90,9 +90,6 @@ extern __thread log_info_t tls_log_info;
|
|||||||
(log_ses_count[id] > 0 && \
|
(log_ses_count[id] > 0 && \
|
||||||
tls_log_info.li_enabled_logs & id)) ? true : false)
|
tls_log_info.li_enabled_logs & id)) ? true : false)
|
||||||
|
|
||||||
#define LOG_MAY_BE_ENABLED(id) (((lm_enabled_logfiles_bitmask & id) || \
|
|
||||||
log_ses_count[id] > 0) ? true : false)
|
|
||||||
|
|
||||||
// TODO: Add this at a later stage.
|
// TODO: Add this at a later stage.
|
||||||
#define MXS_LOG_PRIORITY_IS_ENABLED(priority) false
|
#define MXS_LOG_PRIORITY_IS_ENABLED(priority) false
|
||||||
|
|
||||||
|
|||||||
@ -618,12 +618,9 @@ dcb_process_victim_queue(DCB *listofdcb)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
|
|
||||||
{
|
|
||||||
dcb_get_ses_log_info(dcb,
|
dcb_get_ses_log_info(dcb,
|
||||||
&tls_log_info.li_sesid,
|
&tls_log_info.li_sesid,
|
||||||
&tls_log_info.li_enabled_logs);
|
&tls_log_info.li_enabled_logs);
|
||||||
}
|
|
||||||
|
|
||||||
dcb->state = DCB_STATE_DISCONNECTED;
|
dcb->state = DCB_STATE_DISCONNECTED;
|
||||||
nextdcb = dcb->memdata.next;
|
nextdcb = dcb->memdata.next;
|
||||||
@ -632,11 +629,8 @@ dcb_process_victim_queue(DCB *listofdcb)
|
|||||||
dcb = nextdcb;
|
dcb = nextdcb;
|
||||||
}
|
}
|
||||||
/** Reset threads session data */
|
/** Reset threads session data */
|
||||||
if (LOG_IS_ENABLED(LOGFILE_TRACE))
|
|
||||||
{
|
|
||||||
tls_log_info.li_sesid = 0;
|
tls_log_info.li_sesid = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a DCB from the poll list and trigger shutdown mechanisms.
|
* Remove a DCB from the poll list and trigger shutdown mechanisms.
|
||||||
|
|||||||
@ -540,6 +540,7 @@ static bool file_write_header(
|
|||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
t = time(NULL);
|
||||||
localtime_r(&t, &tm);
|
localtime_r(&t, &tm);
|
||||||
|
|
||||||
header_buf1 = "\n\nMariaDB Corporation MaxScale " MAXSCALE_VERSION "\t";
|
header_buf1 = "\n\nMariaDB Corporation MaxScale " MAXSCALE_VERSION "\t";
|
||||||
|
|||||||
@ -858,12 +858,9 @@ unsigned long qtime;
|
|||||||
if (eno == 0) {
|
if (eno == 0) {
|
||||||
atomic_add(&pollStats.n_write, 1);
|
atomic_add(&pollStats.n_write, 1);
|
||||||
/** Read session id to thread's local storage */
|
/** Read session id to thread's local storage */
|
||||||
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
|
|
||||||
{
|
|
||||||
dcb_get_ses_log_info(dcb,
|
dcb_get_ses_log_info(dcb,
|
||||||
&tls_log_info.li_sesid,
|
&tls_log_info.li_sesid,
|
||||||
&tls_log_info.li_enabled_logs);
|
&tls_log_info.li_enabled_logs);
|
||||||
}
|
|
||||||
|
|
||||||
if (poll_dcb_session_check(dcb, "write_ready"))
|
if (poll_dcb_session_check(dcb, "write_ready"))
|
||||||
{
|
{
|
||||||
@ -891,12 +888,9 @@ unsigned long qtime;
|
|||||||
dcb->fd);
|
dcb->fd);
|
||||||
atomic_add(
|
atomic_add(
|
||||||
&pollStats.n_accept, 1);
|
&pollStats.n_accept, 1);
|
||||||
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
|
|
||||||
{
|
|
||||||
dcb_get_ses_log_info(dcb,
|
dcb_get_ses_log_info(dcb,
|
||||||
&tls_log_info.li_sesid,
|
&tls_log_info.li_sesid,
|
||||||
&tls_log_info.li_enabled_logs);
|
&tls_log_info.li_enabled_logs);
|
||||||
}
|
|
||||||
|
|
||||||
if (poll_dcb_session_check(dcb, "accept"))
|
if (poll_dcb_session_check(dcb, "accept"))
|
||||||
{
|
{
|
||||||
@ -912,12 +906,9 @@ unsigned long qtime;
|
|||||||
dcb->fd);
|
dcb->fd);
|
||||||
atomic_add(&pollStats.n_read, 1);
|
atomic_add(&pollStats.n_read, 1);
|
||||||
/** Read session id to thread's local storage */
|
/** Read session id to thread's local storage */
|
||||||
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
|
|
||||||
{
|
|
||||||
dcb_get_ses_log_info(dcb,
|
dcb_get_ses_log_info(dcb,
|
||||||
&tls_log_info.li_sesid,
|
&tls_log_info.li_sesid,
|
||||||
&tls_log_info.li_enabled_logs);
|
&tls_log_info.li_enabled_logs);
|
||||||
}
|
|
||||||
|
|
||||||
if (poll_dcb_session_check(dcb, "read"))
|
if (poll_dcb_session_check(dcb, "read"))
|
||||||
{
|
{
|
||||||
@ -951,12 +942,10 @@ unsigned long qtime;
|
|||||||
}
|
}
|
||||||
atomic_add(&pollStats.n_error, 1);
|
atomic_add(&pollStats.n_error, 1);
|
||||||
/** Read session id to thread's local storage */
|
/** Read session id to thread's local storage */
|
||||||
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
|
|
||||||
{
|
|
||||||
dcb_get_ses_log_info(dcb,
|
dcb_get_ses_log_info(dcb,
|
||||||
&tls_log_info.li_sesid,
|
&tls_log_info.li_sesid,
|
||||||
&tls_log_info.li_enabled_logs);
|
&tls_log_info.li_enabled_logs);
|
||||||
}
|
|
||||||
if (poll_dcb_session_check(dcb, "error"))
|
if (poll_dcb_session_check(dcb, "error"))
|
||||||
{
|
{
|
||||||
dcb->func.error(dcb);
|
dcb->func.error(dcb);
|
||||||
@ -983,12 +972,10 @@ unsigned long qtime;
|
|||||||
dcb->flags |= DCBF_HUNG;
|
dcb->flags |= DCBF_HUNG;
|
||||||
spinlock_release(&dcb->dcb_initlock);
|
spinlock_release(&dcb->dcb_initlock);
|
||||||
/** Read session id to thread's local storage */
|
/** Read session id to thread's local storage */
|
||||||
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
|
|
||||||
{
|
|
||||||
dcb_get_ses_log_info(dcb,
|
dcb_get_ses_log_info(dcb,
|
||||||
&tls_log_info.li_sesid,
|
&tls_log_info.li_sesid,
|
||||||
&tls_log_info.li_enabled_logs);
|
&tls_log_info.li_enabled_logs);
|
||||||
}
|
|
||||||
if (poll_dcb_session_check(dcb, "hangup EPOLLHUP"))
|
if (poll_dcb_session_check(dcb, "hangup EPOLLHUP"))
|
||||||
{
|
{
|
||||||
dcb->func.hangup(dcb);
|
dcb->func.hangup(dcb);
|
||||||
@ -1019,12 +1006,10 @@ unsigned long qtime;
|
|||||||
dcb->flags |= DCBF_HUNG;
|
dcb->flags |= DCBF_HUNG;
|
||||||
spinlock_release(&dcb->dcb_initlock);
|
spinlock_release(&dcb->dcb_initlock);
|
||||||
/** Read session id to thread's local storage */
|
/** Read session id to thread's local storage */
|
||||||
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
|
|
||||||
{
|
|
||||||
dcb_get_ses_log_info(dcb,
|
dcb_get_ses_log_info(dcb,
|
||||||
&tls_log_info.li_sesid,
|
&tls_log_info.li_sesid,
|
||||||
&tls_log_info.li_enabled_logs);
|
&tls_log_info.li_enabled_logs);
|
||||||
}
|
|
||||||
if (poll_dcb_session_check(dcb, "hangup EPOLLRDHUP"))
|
if (poll_dcb_session_check(dcb, "hangup EPOLLRDHUP"))
|
||||||
{
|
{
|
||||||
dcb->func.hangup(dcb);
|
dcb->func.hangup(dcb);
|
||||||
@ -1090,10 +1075,7 @@ unsigned long qtime;
|
|||||||
}
|
}
|
||||||
dcb->evq.processing = 0;
|
dcb->evq.processing = 0;
|
||||||
/** Reset session id from thread's local storage */
|
/** Reset session id from thread's local storage */
|
||||||
if (LOG_IS_ENABLED(LOGFILE_TRACE))
|
|
||||||
{
|
|
||||||
tls_log_info.li_sesid = 0;
|
tls_log_info.li_sesid = 0;
|
||||||
}
|
|
||||||
spinlock_release(&pollqlock);
|
spinlock_release(&pollqlock);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user