MXS-2273 Make schemarouter honour BEING_DRAINED bit
The schema router now deals with the being drained bit the same way it deals with the maintenance bit, that is, a server being drained will simply be ignored. TODO: This behaviour needs to be document. TODO: It seems the schema router simply ignores the maintenance bit once a connection has been establisdhed.
This commit is contained in:
@ -127,7 +127,7 @@ bool connect_backend_servers(SSRBackendList& backends, MXS_SESSION* session)
|
|||||||
{
|
{
|
||||||
SERVER_REF* b = (*it)->backend();
|
SERVER_REF* b = (*it)->backend();
|
||||||
|
|
||||||
if (b->server->is_usable())
|
if (b->server->is_connectable())
|
||||||
{
|
{
|
||||||
servers_found += 1;
|
servers_found += 1;
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ SchemaRouterSession* SchemaRouter::newSession(MXS_SESSION* pSession)
|
|||||||
|
|
||||||
for (SERVER_REF* ref = m_service->dbref; ref; ref = ref->next)
|
for (SERVER_REF* ref = m_service->dbref; ref; ref = ref->next)
|
||||||
{
|
{
|
||||||
if (ref->active)
|
if (server_ref_is_active(ref))
|
||||||
{
|
{
|
||||||
backends.push_back(SSRBackend(new SRBackend(ref)));
|
backends.push_back(SSRBackend(new SRBackend(ref)));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user