Merge branch '2.2' into develop

This commit is contained in:
Markus Mäkelä
2018-05-03 10:00:44 +03:00
14 changed files with 4165 additions and 55 deletions

View File

@ -589,6 +589,9 @@ routeQuery(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session, GWBUF *queu
inst->stats.n_queries++;
// Due to the streaming nature of readconnroute, this is not accurate
atomic_add_uint64(&router_cli_ses->backend->server->stats.packets, 1);
/** Dirty read for quick check if router is closed. */
if (router_cli_ses->rses_closed)
{

View File

@ -377,6 +377,7 @@ bool RWSplitSession::route_session_write(GWBUF *querybuf, uint8_t command, uint3
if (backend->execute_session_command())
{
nsucc += 1;
atomic_add_uint64(&backend->server()->stats.packets, 1);
if (expecting_response)
{
@ -973,6 +974,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)
{

View File

@ -443,6 +443,7 @@ int32_t SchemaRouterSession::routeQuery(GWBUF* pPacket)
{
/** Add one query response waiter to backend reference */
atomic_add(&m_router->m_stats.n_queries, 1);
atomic_add_uint64(&bref->server()->stats.packets, 1);
ret = 1;
}
else
@ -743,6 +744,7 @@ bool SchemaRouterSession::route_session_write(GWBUF* querybuf, uint8_t command)
if ((*it)->execute_session_command())
{
succp = true;
atomic_add_uint64(&(*it)->server()->stats.packets, 1);
}
else
{