MXS-3330: Book only expected responses

Responses generated by replayed session commands must not be treated as
actual responses to retained statements. In 2.5 this is not a problem as
it is done implicitly with the pre-assignment of the server that delivers
the session command response.
This commit is contained in:
Markus Mäkelä 2021-02-10 09:42:12 +02:00
parent 47bcb6ad02
commit 2657cc100e
No known key found for this signature in database
GPG Key ID: 5CE746D557ACC499

View File

@ -734,7 +734,10 @@ void RWSplitSession::clientReply(GWBUF* writebuf, DCB* backend_dcb)
/** Got a complete reply, decrement expected response count */
m_expected_responses--;
session_book_server_response(m_pSession, backend->backend()->server, m_expected_responses == 0);
if (!backend->is_replaying_history())
{
session_book_server_response(m_pSession, backend->backend()->server, m_expected_responses == 0);
}
mxb_assert(m_expected_responses >= 0);
mxb_assert(backend->get_reply_state() == REPLY_STATE_DONE);