MXS-2078 Take new statistics into use

This commit is contained in:
Niclas Antti
2018-11-05 16:15:16 +02:00
parent 5175d2b2d7
commit c692c864e2
7 changed files with 55 additions and 31 deletions

View File

@ -80,6 +80,11 @@ RWSplitSession* RWSplitSession::create(RWSplit* router, MXS_SESSION* session)
{
router->stats().n_sessions += 1;
}
for (auto& b : backends)
{
router->server_stats(b->server()).start_session();
}
}
}
@ -115,6 +120,11 @@ void RWSplitSession::close()
stat.num_samples());
}
backend->response_stat().reset();
m_router->server_stats(backend->server()).end_session(
backend->session_timer().split(),
backend->select_timer().total(),
backend->num_selects());
}
}
@ -621,6 +631,8 @@ void RWSplitSession::clientReply(GWBUF* writebuf, DCB* backend_dcb)
session_set_load_active(m_pSession, true);
}
backend->select_ended();
if (m_otrx_state == OTRX_ROLLBACK)
{
// Transaction rolled back, start replaying it on the master