You've already forked mariadb-columnstore-engine
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:
@@ -3385,12 +3385,12 @@ int ProcessManager::disableModule(string target, bool manualFlag)
|
|||||||
* purpose: recyle process, generally after some disable module is run
|
* purpose: recyle process, generally after some disable module is run
|
||||||
*
|
*
|
||||||
******************************************************************************************/
|
******************************************************************************************/
|
||||||
void ProcessManager::recycleProcess(string module)
|
void ProcessManager::recycleProcess(string module, bool enableModule)
|
||||||
{
|
{
|
||||||
Oam oam;
|
Oam oam;
|
||||||
ModuleConfig moduleconfig;
|
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);
|
string moduleType = module.substr(0,MAX_MODULE_TYPE_SIZE);
|
||||||
|
|
||||||
@@ -3399,11 +3399,23 @@ void ProcessManager::recycleProcess(string module)
|
|||||||
oam.getSystemConfig("PrimaryUMModuleName", PrimaryUMModuleName);
|
oam.getSystemConfig("PrimaryUMModuleName", PrimaryUMModuleName);
|
||||||
}
|
}
|
||||||
catch(...) {}
|
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
|
//recycle DBRM processes in all cases
|
||||||
restartProcessType("DBRMControllerNode", module);
|
restartProcessType("DBRMControllerNode", module);
|
||||||
restartProcessType("DBRMWorkerNode");
|
restartProcessType("DBRMWorkerNode");
|
||||||
|
|
||||||
|
|
||||||
// only recycle dmlproc, if down/up module is non-parent UM
|
// only recycle dmlproc, if down/up module is non-parent UM
|
||||||
if ( ( moduleType == "um" ) &&
|
if ( ( moduleType == "um" ) &&
|
||||||
( PrimaryUMModuleName != module) )
|
( PrimaryUMModuleName != module) )
|
||||||
@@ -3483,6 +3495,9 @@ int ProcessManager::enableModule(string target, int state)
|
|||||||
if ( newStandbyModule == target)
|
if ( newStandbyModule == target)
|
||||||
setStandbyModule(newStandbyModule);
|
setStandbyModule(newStandbyModule);
|
||||||
|
|
||||||
|
//set recycle process
|
||||||
|
recycleProcess(target);
|
||||||
|
|
||||||
log.writeLog(__LINE__, "enableModule request for " + target + " completed", LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "enableModule request for " + target + " completed", LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
return API_SUCCESS;
|
return API_SUCCESS;
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
*@brief recycle Processes
|
*@brief recycle Processes
|
||||||
*/
|
*/
|
||||||
void recycleProcess(std::string module);
|
void recycleProcess(std::string module, bool enableModule = false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*@brief Enable a specified module
|
*@brief Enable a specified module
|
||||||
|
|||||||
Reference in New Issue
Block a user