MXS-1625 large_query flag moved from RWS session to query classifier
This commit is contained in:
@ -347,7 +347,7 @@ int32_t RWSplitSession::routeQuery(GWBUF* querybuf)
|
||||
(expected_responses == 0 ||
|
||||
mxs_mysql_get_command(querybuf) == MXS_COM_STMT_FETCH ||
|
||||
m_qc.load_data_state() == QueryClassifier::LOAD_DATA_ACTIVE ||
|
||||
large_query))
|
||||
m_qc.large_query()))
|
||||
{
|
||||
/** Gather the information required to make routing decisions */
|
||||
RouteInfo info(this, querybuf);
|
||||
|
@ -108,7 +108,7 @@ route_target_t get_route_target(mxs::QueryClassifier& qc,
|
||||
void
|
||||
log_transaction_status(RWSplitSession *rses, GWBUF *querybuf, uint32_t qtype)
|
||||
{
|
||||
if (rses->m_large_query)
|
||||
if (rses->qc().large_query())
|
||||
{
|
||||
MXS_INFO("> Processing large request with more than 2^24 bytes of data");
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ bool RWSplitSession::route_single_stmt(GWBUF *querybuf, const RouteInfo& info)
|
||||
{
|
||||
bool store_stmt = false;
|
||||
|
||||
if (m_large_query)
|
||||
if (m_qc.large_query())
|
||||
{
|
||||
/** We're processing a large query that's split across multiple packets.
|
||||
* Route it to the same backend where we routed the previous packet. */
|
||||
@ -975,7 +975,9 @@ bool RWSplitSession::handle_got_target(GWBUF* querybuf, SRWBackend& target, bool
|
||||
}
|
||||
}
|
||||
|
||||
if ((this->m_large_query = large_query))
|
||||
m_qc.set_large_query(large_query);
|
||||
|
||||
if (large_query)
|
||||
{
|
||||
/** Store the previous target as we're processing a multi-packet query */
|
||||
m_prev_target = target;
|
||||
|
@ -24,7 +24,6 @@ RWSplitSession::RWSplitSession(RWSplit* instance, MXS_SESSION* session,
|
||||
mxs::RouterSession(session),
|
||||
m_backends(backends),
|
||||
m_current_master(master),
|
||||
m_large_query(false),
|
||||
m_config(instance->config()),
|
||||
m_nbackends(instance->service()->n_dbref),
|
||||
m_load_data_sent(0),
|
||||
|
@ -104,7 +104,6 @@ public:
|
||||
mxs::SRWBackend m_current_master; /**< Current master server */
|
||||
mxs::SRWBackend m_target_node; /**< The currently locked target node */
|
||||
mxs::SRWBackend m_prev_target; /**< The previous target where a query was sent */
|
||||
bool m_large_query; /**< Set to true when processing payloads >= 2^24 bytes */
|
||||
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 */
|
||||
@ -175,7 +174,11 @@ private:
|
||||
*/
|
||||
inline bool locked_to_master() const
|
||||
{
|
||||
<<<<<<< bc22790e1bde96fc6a16b8c719805b9d3dd193b5
|
||||
return m_large_query || (m_current_master && m_target_node == m_current_master);
|
||||
=======
|
||||
return m_qc.large_query() || (current_master && target_node == current_master);
|
||||
>>>>>>> MXS-1625 large_query flag moved from RWS session to query classifier
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user