Execute service_internal_restart on main worker
The task needs to be executed on a routing worker as it accesses authenticator data that at least for MySQLAuth is worker specific.
This commit is contained in:
parent
e46104c32a
commit
7ea22c3d16
@ -1304,8 +1304,14 @@ std::unique_ptr<ResultSet> serviceGetList()
|
||||
*/
|
||||
static bool service_internal_restart(void* data)
|
||||
{
|
||||
Service* service = (Service*)data;
|
||||
serviceStartAllPorts(service);
|
||||
auto func = [=]() {
|
||||
Service* service = static_cast<Service*>(data);
|
||||
serviceStartAllPorts(service);
|
||||
};
|
||||
|
||||
auto worker = mxs::RoutingWorker::get(mxs::RoutingWorker::MAIN);
|
||||
worker->execute(func, nullptr, mxs::RoutingWorker::EXECUTE_AUTO);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user