Added trace log to newSession and to closeSession.
This commit is contained in:
@ -218,8 +218,10 @@ int i, n;
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
skygw_log_write(LOGFILE_ERROR,
|
skygw_log_write(LOGFILE_ERROR,
|
||||||
"Unsupported router option %s for readconnroute\n", options[i]);
|
"Unsupported router option %s for "
|
||||||
|
"readconnroute\n",
|
||||||
|
options[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -252,6 +254,15 @@ CLIENT_SESSION *client;
|
|||||||
BACKEND *candidate = NULL;
|
BACKEND *candidate = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
skygw_log_write_flush(
|
||||||
|
LOGFILE_TRACE,
|
||||||
|
"%lu [closeSession] new router session with session "
|
||||||
|
"%p, and inst %p.",
|
||||||
|
pthread_self(),
|
||||||
|
session,
|
||||||
|
inst);
|
||||||
|
|
||||||
|
|
||||||
if ((client = (CLIENT_SESSION *)malloc(sizeof(CLIENT_SESSION))) == NULL) {
|
if ((client = (CLIENT_SESSION *)malloc(sizeof(CLIENT_SESSION))) == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -366,6 +377,13 @@ CLIENT_SESSION *session = (CLIENT_SESSION *)router_session;
|
|||||||
/*
|
/*
|
||||||
* Close the connection to the backend
|
* Close the connection to the backend
|
||||||
*/
|
*/
|
||||||
|
skygw_log_write_flush(
|
||||||
|
LOGFILE_TRACE,
|
||||||
|
"%lu [closeSession] closing session with router_session "
|
||||||
|
"%p, and inst %p.",
|
||||||
|
pthread_self(),
|
||||||
|
session,
|
||||||
|
inst);
|
||||||
session->dcb->func.close(session->dcb);
|
session->dcb->func.close(session->dcb);
|
||||||
atomic_add(&session->backend->current_connection_count, -1);
|
atomic_add(&session->backend->current_connection_count, -1);
|
||||||
atomic_add(&session->backend->server->stats.n_current, -1);
|
atomic_add(&session->backend->server->stats.n_current, -1);
|
||||||
|
|||||||
Reference in New Issue
Block a user