MXS-1458: Mark backend server as inactive if router is not configured.

MXS-1458: Mark backend server as inactive if router is not configured.
This commit is contained in:
MassimilianoPinto
2017-09-28 10:01:29 +02:00
parent 016ad77b62
commit 32709b3e46
2 changed files with 16 additions and 1 deletions

View File

@ -1037,6 +1037,15 @@ blr_slave_query(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, GWBUF *queue)
return 1;
}
/* Mark as active the master server struct */
spinlock_acquire(&router->lock);
if (!router->service->dbref->server->is_active)
{
router->service->dbref->server->is_active = true;
router->service->dbref->active = true;
}
spinlock_release(&router->lock);
/**
* check if router is BLRM_UNCONFIGURED
* and change state to BLRM_SLAVE_STOPPED