MXS-2068: Move common functionality into RWBackend

The RWBackend now updates the internal state when a new write is done in
addition to acknowledging it when the reply is complete.
This commit is contained in:
Markus Mäkelä
2018-09-24 13:57:55 +03:00
parent 09a64753f1
commit a32361e894
5 changed files with 39 additions and 27 deletions

View File

@ -562,8 +562,7 @@ void RWSplitSession::clientReply(GWBUF* writebuf, DCB* backend_dcb)
if (backend->reply_is_complete(writebuf))
{
/** Got a complete reply, acknowledge the write and decrement expected response count */
backend->ack_write();
/** Got a complete reply, decrement expected response count */
m_expected_responses--;
mxb_assert(m_expected_responses >= 0);
mxb_assert(backend->get_reply_state() == REPLY_STATE_DONE);