Merge branch '2.2' into develop

This commit is contained in:
Markus Mäkelä
2018-09-20 12:16:55 +03:00
9 changed files with 19 additions and 9 deletions

View File

@ -1046,7 +1046,8 @@ static int get_users(SERV_LISTENER* listener, bool skip_local)
for (server = service->dbref; !maxscale_is_shutting_down() && server; server = server->next)
{
if (!SERVER_REF_IS_ACTIVE(server) || !server_is_active(server->server)
|| (skip_local && server_is_mxs_service(server->server)))
|| (skip_local && server_is_mxs_service(server->server))
|| !server_is_running(server->server))
{
continue;
}

View File

@ -419,6 +419,7 @@ bool RWSplitSession::route_session_write(GWBUF* querybuf, uint8_t command, uint3
}
MXS_INFO("Session write, routing to all servers.");
bool attempted_write = false;
for (auto it = m_backends.begin(); it != m_backends.end(); it++)
{
@ -426,6 +427,7 @@ bool RWSplitSession::route_session_write(GWBUF* querybuf, uint8_t command, uint3
if (backend->in_use())
{
attempted_write = true;
backend->append_session_command(sescmd);
uint64_t current_pos = backend->next_session_command()->get_position();
@ -510,6 +512,11 @@ bool RWSplitSession::route_session_write(GWBUF* querybuf, uint8_t command, uint3
m_recv_sescmd++;
}
}
else
{
MXS_ERROR("Could not route session command: %s", attempted_write ? "Write to all backends failed" :
"All connections have failed");
}
return nsucc;
}