Add extra info logging to readwritesplit

Added logging into RWBackend reply state processing code to know more.
This commit is contained in:
Markus Mäkelä 2019-03-29 14:14:26 +02:00
parent bc5f9da6c4
commit e6526dd9ea
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 24 additions and 0 deletions

View File

@ -54,6 +54,27 @@ public:
return m_reply_state;
}
const char* reply_state_str() const
{
switch (m_reply_state)
{
case REPLY_STATE_START:
return "START";
case REPLY_STATE_DONE:
return "DONE";
case REPLY_STATE_RSET_COLDEF:
return "COLDEF";
case REPLY_STATE_RSET_ROWS:
return "ROWS";
default:
return "UNKNOWN";
}
}
void add_ps_handle(uint32_t id, uint32_t handle);
uint32_t get_ps_handle(uint32_t id) const;

View File

@ -254,6 +254,9 @@ void RWBackend::process_reply(GWBUF* buffer)
}
}
MXS_DEBUG("cmd: %02hhx bytes: %u packets: %d state: %s", mxs_mysql_get_command(buffer),
gwbuf_length(buffer), modutil_count_packets(buffer), reply_state_str());
if (get_reply_state() == REPLY_STATE_DONE)
{
ack_write();