Add extra info logging to readwritesplit
Added logging into RWBackend reply state processing code to know more.
This commit is contained in:
@ -54,6 +54,27 @@ public:
|
|||||||
return m_reply_state;
|
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);
|
void add_ps_handle(uint32_t id, uint32_t handle);
|
||||||
uint32_t get_ps_handle(uint32_t id) const;
|
uint32_t get_ps_handle(uint32_t id) const;
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
if (get_reply_state() == REPLY_STATE_DONE)
|
||||||
{
|
{
|
||||||
ack_write();
|
ack_write();
|
||||||
|
|||||||
Reference in New Issue
Block a user