From 8c1e7172f3eca41623ad6a90737682b1af2a3b2f Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Fri, 14 Nov 2014 20:48:33 +0200 Subject: [PATCH] Added debug logging for #615 --- server/core/dcb.c | 4 ++++ server/modules/protocol/mysql_backend.c | 4 ++++ server/modules/protocol/mysql_client.c | 4 ++++ server/modules/routing/readwritesplit/readwritesplit.c | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/server/core/dcb.c b/server/core/dcb.c index 26ab592c5..244b50c06 100644 --- a/server/core/dcb.c +++ b/server/core/dcb.c @@ -1119,6 +1119,10 @@ dcb_close(DCB *dcb) CHK_DCB(dcb); + LOGIF(LD, (skygw_log_write(LOGFILE_DEBUG, + "%lu [dcb_close]", + pthread_self()))); + /*< * dcb_close may be called for freshly created dcb, in which case * it only needs to be freed. diff --git a/server/modules/protocol/mysql_backend.c b/server/modules/protocol/mysql_backend.c index aae579d09..96fe9377f 100644 --- a/server/modules/protocol/mysql_backend.c +++ b/server/modules/protocol/mysql_backend.c @@ -1089,6 +1089,10 @@ gw_backend_close(DCB *dcb) session = dcb->session; CHK_SESSION(session); + LOGIF(LD, (skygw_log_write(LOGFILE_DEBUG, + "%lu [gw_backend_close]", + pthread_self()))); + quitbuf = mysql_create_com_quit(NULL, 0); gwbuf_set_type(quitbuf, GWBUF_TYPE_MYSQL); diff --git a/server/modules/protocol/mysql_client.c b/server/modules/protocol/mysql_client.c index 49d382bbc..77ef7c9ef 100644 --- a/server/modules/protocol/mysql_client.c +++ b/server/modules/protocol/mysql_client.c @@ -1392,6 +1392,10 @@ gw_client_close(DCB *dcb) CHK_PROTOCOL(protocol); } #endif + LOGIF(LD, (skygw_log_write(LOGFILE_DEBUG, + "%lu [gw_client_close]", + pthread_self()))); + mysql_protocol_done(dcb); session = dcb->session; diff --git a/server/modules/routing/readwritesplit/readwritesplit.c b/server/modules/routing/readwritesplit/readwritesplit.c index fd47a3c19..e3c308242 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.c +++ b/server/modules/routing/readwritesplit/readwritesplit.c @@ -912,6 +912,10 @@ static void closeSession( ROUTER_CLIENT_SES* router_cli_ses; backend_ref_t* backend_ref; + LOGIF(LD, (skygw_log_write(LOGFILE_DEBUG, + "%lu [RWSplit:closeSession]", + pthread_self()))); + /** * router session can be NULL if newSession failed and it is discarding * its connections and DCB's.