You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
mcol-938 - fixed pm server ids
This commit is contained in:
@ -4776,7 +4776,7 @@ int ProcessMonitor::changeMyCnf(std::string type)
|
|||||||
{
|
{
|
||||||
*/ //get slave id based on ExeMgrx setup
|
*/ //get slave id based on ExeMgrx setup
|
||||||
string slaveID = "0";
|
string slaveID = "0";
|
||||||
string slaveModuleName = config.moduleName();
|
string localModuleName = config.moduleName();
|
||||||
for ( int id = 1 ; ; id++ )
|
for ( int id = 1 ; ; id++ )
|
||||||
{
|
{
|
||||||
string Section = "ExeMgr" + oam.itoa(id);
|
string Section = "ExeMgr" + oam.itoa(id);
|
||||||
@ -4787,34 +4787,9 @@ int ProcessMonitor::changeMyCnf(std::string type)
|
|||||||
Config* sysConfig = Config::makeConfig();
|
Config* sysConfig = Config::makeConfig();
|
||||||
moduleName = sysConfig->getConfig(Section, "Module");
|
moduleName = sysConfig->getConfig(Section, "Module");
|
||||||
|
|
||||||
if ( moduleName == slaveModuleName )
|
if ( moduleName == localModuleName )
|
||||||
{
|
{
|
||||||
slaveID = oam.itoa(id);
|
slaveID = oam.itoa(id);
|
||||||
|
|
||||||
// if slave ID from above is 1, then it means this is a former Original master and use the ID of the current Master
|
|
||||||
if ( slaveID == "1" ) {
|
|
||||||
string PrimaryUMModuleName;
|
|
||||||
oam.getSystemConfig("PrimaryUMModuleName", PrimaryUMModuleName);
|
|
||||||
|
|
||||||
for ( int mid = 1 ; ; mid++ )
|
|
||||||
{
|
|
||||||
string Section = "ExeMgr" + oam.itoa(mid);
|
|
||||||
|
|
||||||
string moduleName;
|
|
||||||
|
|
||||||
try {
|
|
||||||
Config* sysConfig = Config::makeConfig();
|
|
||||||
moduleName = sysConfig->getConfig(Section, "Module");
|
|
||||||
|
|
||||||
if ( moduleName == PrimaryUMModuleName )
|
|
||||||
{
|
|
||||||
slaveID = oam.itoa(mid);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (...) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user