More logging information for schemarouter about router state.

This commit is contained in:
Markus Makela
2015-03-13 06:06:34 +02:00
parent ca44549ddf
commit 6fdc7339f9

View File

@ -2247,8 +2247,8 @@ static void clientReply (
goto lock_failed; goto lock_failed;
} }
skygw_log_write(LOGFILE_DEBUG,"schemarouter: Received reply from %s for session %p" skygw_log_write(LOGFILE_DEBUG,"schemarouter: Reply from [%s] session [%p]"
"\nmapped:%s queries queued:%s", " mapping [%s] queries queued [%s]",
bref->bref_backend->backend_server->unique_name, bref->bref_backend->backend_server->unique_name,
router_cli_ses->rses_client_dcb->session, router_cli_ses->rses_client_dcb->session,
router_cli_ses->init & INIT_MAPPING?"true":"false", router_cli_ses->init & INIT_MAPPING?"true":"false",
@ -2481,11 +2481,14 @@ static void clientReply (
if (writebuf != NULL && client_dcb != NULL) if (writebuf != NULL && client_dcb != NULL)
{ {
unsigned char* cmd = (unsigned char*)writebuf->start;
int state = router_cli_ses->init;
/** Write reply to client DCB */ /** Write reply to client DCB */
char* query = modutil_get_SQL(writebuf); skygw_log_write(LOGFILE_TRACE, "schemarouter: returning reply [%s] "
skygw_log_write(LOGFILE_TRACE, "schemarouter: returning reply [%x]: %s", "state [%s] session [%p]",
writebuf->start+4, PTR_IS_ERR(cmd) ? "ERR" :PTR_IS_OK(cmd) ? "OK" : "RSET",
query); state & INIT_UNINT ? "UNINIT" :state & INIT_MAPPING ? "MAPPING" : "READY",
router_cli_ses->rses_client_dcb->session);
SESSION_ROUTE_REPLY(backend_dcb->session, writebuf); SESSION_ROUTE_REPLY(backend_dcb->session, writebuf);
} }
/** Unlock router session */ /** Unlock router session */