1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-24 08:41:09 +03:00

Merge pull request #437 from mariadb-corporation/MCOL-912

MCOL-912 - added code to restart dbrm/ddml process when enable module…
This commit is contained in:
benthompson15
2018-04-16 10:40:35 -05:00
committed by GitHub
2 changed files with 18 additions and 3 deletions

View File

@@ -3385,12 +3385,12 @@ int ProcessManager::disableModule(string target, bool manualFlag)
* purpose: recyle process, generally after some disable module is run
*
******************************************************************************************/
void ProcessManager::recycleProcess(string module)
void ProcessManager::recycleProcess(string module, bool enableModule)
{
Oam oam;
ModuleConfig moduleconfig;
log.writeLog(__LINE__, "recycleProcess request after module was disabled: " + module, LOG_TYPE_DEBUG);
log.writeLog(__LINE__, "recycleProcess request after module status update: " + module, LOG_TYPE_DEBUG);
string moduleType = module.substr(0,MAX_MODULE_TYPE_SIZE);
@@ -3399,11 +3399,23 @@ void ProcessManager::recycleProcess(string module)
oam.getSystemConfig("PrimaryUMModuleName", PrimaryUMModuleName);
}
catch(...) {}
// restart DBRM Process and DMLProc and return if enable module is being done
if (enableModule)
{
//recycle DBRM processes in all cases
restartProcessType("DBRMControllerNode");
restartProcessType("DBRMWorkerNode");
restartProcessType("DMLProc");
return;
}
//recycle DBRM processes in all cases
restartProcessType("DBRMControllerNode", module);
restartProcessType("DBRMWorkerNode");
// only recycle dmlproc, if down/up module is non-parent UM
if ( ( moduleType == "um" ) &&
( PrimaryUMModuleName != module) )
@@ -3483,6 +3495,9 @@ int ProcessManager::enableModule(string target, int state)
if ( newStandbyModule == target)
setStandbyModule(newStandbyModule);
//set recycle process
recycleProcess(target);
log.writeLog(__LINE__, "enableModule request for " + target + " completed", LOG_TYPE_DEBUG);
return API_SUCCESS;