1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-10-22 22:32:34 +03:00

Merge branch 'develop-1.1' into develop

This commit is contained in:
Andrew Hutchings
2017-10-30 10:29:30 +00:00
10 changed files with 74 additions and 72 deletions

View File

@@ -5157,7 +5157,7 @@ int ProcessMonitor::changeMyCnf(std::string type)
{
*/ //get slave id based on ExeMgrx setup
string slaveID = "0";
string slaveModuleName = config.moduleName();
string localModuleName = config.moduleName();
for ( int id = 1 ; ; id++ )
{
@@ -5170,37 +5170,9 @@ int ProcessMonitor::changeMyCnf(std::string type)
Config* sysConfig = Config::makeConfig();
moduleName = sysConfig->getConfig(Section, "Module");
if ( moduleName == slaveModuleName )
if ( moduleName == localModuleName )
{
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;
}
}