MXS-1625 Move LOAD DATA sent statistics to QueryClassifier
Eventually the tracking will be internal to QueryClassifier.
This commit is contained in:
@ -146,7 +146,7 @@ log_transaction_status(RWSplitSession *rses, GWBUF *querybuf, uint32_t qtype)
|
||||
else
|
||||
{
|
||||
MXS_INFO("> Processing LOAD DATA LOCAL INFILE: %lu bytes sent.",
|
||||
rses->m_load_data_sent);
|
||||
rses->qc().load_data_sent());
|
||||
}
|
||||
}
|
||||
|
||||
@ -493,7 +493,7 @@ handle_multi_temp_and_load(RWSplitSession *rses, GWBUF *querybuf,
|
||||
*/
|
||||
if (rses->qc().load_data_state() == QueryClassifier::LOAD_DATA_ACTIVE)
|
||||
{
|
||||
rses->m_load_data_sent += gwbuf_length(querybuf);
|
||||
rses->qc().append_load_data_sent(querybuf);
|
||||
}
|
||||
else if (is_packet_a_query(packet_type))
|
||||
{
|
||||
@ -501,7 +501,7 @@ handle_multi_temp_and_load(RWSplitSession *rses, GWBUF *querybuf,
|
||||
if (queryop == QUERY_OP_LOAD)
|
||||
{
|
||||
rses->qc().set_load_data_state(QueryClassifier::LOAD_DATA_START);
|
||||
rses->m_load_data_sent = 0;
|
||||
rses->qc().reset_load_data_sent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -597,8 +597,9 @@ route_target_t get_target_type(RWSplitSession *rses, GWBUF *buffer,
|
||||
{
|
||||
/** Empty packet signals end of LOAD DATA LOCAL INFILE, send it to master*/
|
||||
rses->qc().set_load_data_state(QueryClassifier::LOAD_DATA_END);
|
||||
rses->qc().append_load_data_sent(buffer);
|
||||
MXS_INFO("> LOAD DATA LOCAL INFILE finished: %lu bytes sent.",
|
||||
rses->m_load_data_sent + gwbuf_length(buffer));
|
||||
rses->qc().load_data_sent());
|
||||
}
|
||||
|
||||
return route_target;
|
||||
|
@ -26,7 +26,6 @@ RWSplitSession::RWSplitSession(RWSplit* instance, MXS_SESSION* session,
|
||||
m_current_master(master),
|
||||
m_config(instance->config()),
|
||||
m_nbackends(instance->service()->n_dbref),
|
||||
m_load_data_sent(0),
|
||||
m_client(session->client_dcb),
|
||||
m_sescmd_count(1), // Needs to be a positive number to work
|
||||
m_expected_responses(0),
|
||||
|
@ -106,7 +106,6 @@ public:
|
||||
mxs::SRWBackend m_prev_target; /**< The previous target where a query was sent */
|
||||
Config m_config; /**< copied config info from router instance */
|
||||
int m_nbackends; /**< Number of backend servers (obsolete) */
|
||||
uint64_t m_load_data_sent; /**< How much data has been sent */
|
||||
DCB* m_client; /**< The client DCB */
|
||||
uint64_t m_sescmd_count; /**< Number of executed session commands */
|
||||
int m_expected_responses; /**< Number of expected responses to the current query */
|
||||
|
Reference in New Issue
Block a user