Fix large packet execution

The number of expected responses was not correctly tracked for large
packets.
This commit is contained in:
Markus Mäkelä
2018-05-28 13:51:05 +03:00
parent be098538e5
commit 2bbf1271c9
2 changed files with 2 additions and 1 deletions

View File

@ -987,7 +987,7 @@ bool RWSplitSession::handle_got_target(GWBUF* querybuf, SRWBackend& target, bool
atomic_add_uint64(&m_router->stats().n_queries, 1);
atomic_add_uint64(&target->server()->stats.packets, 1);
if (!large_query && response == mxs::Backend::EXPECT_RESPONSE)
if (!m_qc.large_query() && response == mxs::Backend::EXPECT_RESPONSE)
{
/** The server will reply to this command */
ss_dassert(target->get_reply_state() == REPLY_STATE_DONE);

View File

@ -643,6 +643,7 @@ void RWSplitSession::handleError(GWBUF *errmsgbuf, DCB *problem_dcb,
else
{
// We were expecting a response but we aren't going to get one
ss_dassert(m_expected_responses > 0);
m_expected_responses--;
if (can_retry_query())