You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
merge
This commit is contained in:
@ -338,11 +338,12 @@ int main(int argc, char** argv)
|
||||
// check if standby never replied, if so, shutdown
|
||||
if ( count >= 120 )
|
||||
{
|
||||
log.writeLog(__LINE__, "Standby PM not responding, columnstore shutting down", LOG_TYPE_CRITICAL);
|
||||
//Set the alarm, commented out. alarm require ProcMgr
|
||||
//aMonitor.sendAlarm(config.moduleName().c_str(), STARTUP_DIAGNOTICS_FAILURE, SET);
|
||||
sleep (1);
|
||||
string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /dev/null 2>&1";
|
||||
log.writeLog(__LINE__, "Standby PM not responding, infinidb shutting down", LOG_TYPE_CRITICAL);
|
||||
//Set the alarm
|
||||
// aMonitor.sendAlarm(config.moduleName().c_str(), STARTUP_DIAGNOTICS_FAILURE, SET);
|
||||
// sleep (1);
|
||||
|
||||
string cmd = startup::StartUp::installDir() + "/bin/infinidb stop > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
|
||||
@ -369,8 +370,7 @@ int main(int argc, char** argv)
|
||||
sysConfig->setConfig("ProcMgr_Alarm", "IPAddr", IPaddr);
|
||||
|
||||
log.writeLog(__LINE__, "set ProcMgr IPaddr to Old Standby Module: " + IPaddr, LOG_TYPE_DEBUG);
|
||||
|
||||
//update Calpont Config table
|
||||
//update MariaDB ColumnStore Config table
|
||||
try
|
||||
{
|
||||
sysConfig->write();
|
||||
@ -437,7 +437,7 @@ int main(int argc, char** argv)
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
log.writeLog(__LINE__, "waiting for good return from getModuleStatus", LOG_TYPE_DEBUG);
|
||||
log.writeLog(__LINE__, "wating for good return from getModuleStatus", LOG_TYPE_DEBUG);
|
||||
sleep (1);
|
||||
}
|
||||
}
|
||||
@ -553,9 +553,9 @@ int main(int argc, char** argv)
|
||||
if ( retry == 20 )
|
||||
{
|
||||
log.writeLog(__LINE__, "Check DB mounts failed, shutting down", LOG_TYPE_CRITICAL);
|
||||
//Set the alarm, commented out. alarm require ProcMgr
|
||||
//aMonitor.sendAlarm(config.moduleName().c_str(), STARTUP_DIAGNOTICS_FAILURE, SET);
|
||||
sleep (1);
|
||||
//Set the alarm
|
||||
// aMonitor.sendAlarm(config.moduleName().c_str(), STARTUP_DIAGNOTICS_FAILURE, SET);
|
||||
// sleep (1);
|
||||
string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
}
|
||||
@ -582,7 +582,7 @@ int main(int argc, char** argv)
|
||||
|
||||
while (!mainResumeFlag)
|
||||
{
|
||||
log.writeLog(__LINE__, "WAITING FOR mainResumeFlag to be set", LOG_TYPE_DEBUG);
|
||||
log.writeLog(__LINE__, "WATING FOR mainResumeFlag to be set", LOG_TYPE_DEBUG);
|
||||
|
||||
sleep(1);
|
||||
}
|
||||
@ -774,11 +774,11 @@ int main(int argc, char** argv)
|
||||
if ( ret != 0 )
|
||||
log.writeLog(__LINE__, "pthread_create failed, return code = " + oam.itoa(ret), LOG_TYPE_ERROR);
|
||||
|
||||
//mysql status monitor thread
|
||||
if ( ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM ) ||
|
||||
(PMwithUM == "y") )
|
||||
//mysqld status monitor thread
|
||||
if ( config.moduleType() == "um" ||
|
||||
( config.moduleType() == "pm" && config.ServerInstallType() == oam::INSTALL_COMBINE_DM_UM_PM ) ||
|
||||
( config.moduleType() == "pm" && PMwithUM == "y") )
|
||||
{
|
||||
|
||||
pthread_t mysqlThread;
|
||||
ret = pthread_create (&mysqlThread, NULL, (void* (*)(void*)) &mysqlMonitorThread, NULL);
|
||||
|
||||
@ -1131,6 +1131,9 @@ static void messageThread(MonitorConfig config)
|
||||
|
||||
string cmd = "fuser -k " + port + "/tcp >/dev/null 2>&1";
|
||||
|
||||
if ( !rootUser)
|
||||
cmd = "sudo fuser -k " + port + "/tcp >/dev/null 2>&1";
|
||||
|
||||
system(cmd.c_str());
|
||||
|
||||
for (;;)
|
||||
@ -1223,7 +1226,7 @@ static void mysqlMonitorThread(MonitorConfig config)
|
||||
catch (...)
|
||||
{}
|
||||
|
||||
sleep(10);
|
||||
sleep(5);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1460,7 +1463,7 @@ static void chldHandleThread(MonitorConfig config)
|
||||
(*listPtr).processID != 0 ) ||
|
||||
( (*listPtr).state == oam::ACTIVE && (*listPtr).processID == 0 ) )
|
||||
{
|
||||
log.writeLog(__LINE__, "*****Calpont Process Restarting: " + (*listPtr).ProcessName + ", old PID = " + oam.itoa((*listPtr).processID), LOG_TYPE_CRITICAL);
|
||||
log.writeLog(__LINE__, "*****MariaDB ColumnStore Process Restarting: " + (*listPtr).ProcessName + ", old PID = " + oam.itoa((*listPtr).processID), LOG_TYPE_CRITICAL);
|
||||
|
||||
if ( (*listPtr).dieCounter >= processRestartCount ||
|
||||
processRestartCount == 0)
|
||||
@ -1520,7 +1523,7 @@ static void chldHandleThread(MonitorConfig config)
|
||||
{}
|
||||
|
||||
// check if process failover is needed due to process outage
|
||||
aMonitor.checkProcessFailover((*listPtr).ProcessName);
|
||||
aMonitor.checkModuleFailover((*listPtr).ProcessName);
|
||||
|
||||
//check the db health
|
||||
if (DBFunctionalMonitorFlag == "y" )
|
||||
@ -1602,7 +1605,7 @@ static void chldHandleThread(MonitorConfig config)
|
||||
(*listPtr).processID = 0;
|
||||
|
||||
// check if process failover is needed due to process outage
|
||||
aMonitor.checkProcessFailover((*listPtr).ProcessName);
|
||||
aMonitor.checkModuleFailover((*listPtr).ProcessName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
@ -1678,7 +1681,7 @@ static void chldHandleThread(MonitorConfig config)
|
||||
}
|
||||
|
||||
//Log this event
|
||||
log.writeLog(__LINE__, "Calpont Process " + (*listPtr).ProcessName + restartStatus, LOG_TYPE_INFO);
|
||||
log.writeLog(__LINE__, "MariaDB ColumnStore Process " + (*listPtr).ProcessName + restartStatus, LOG_TYPE_INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2360,7 +2363,10 @@ static void statusControlThread()
|
||||
string port = sysConfig->getConfig(portName, "Port");
|
||||
string cmd = "fuser -k " + port + "/tcp >/dev/null 2>&1";
|
||||
|
||||
system(cmd.c_str());
|
||||
if ( !rootUser)
|
||||
cmd = "sudo fuser -k " + port + "/tcp >/dev/null 2>&1";
|
||||
|
||||
system(cmd.c_str());
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@ -2701,6 +2707,9 @@ void processStatusMSG(messageqcpp::IOSocket* cfIos)
|
||||
memcpy(fShmSystemStatus[0].StateChangeDate, oam.getCurrentTime().c_str(), DATESIZE);
|
||||
log.writeLog(__LINE__, "statusControl: REQUEST RECEIVED: Set System State = " + oamState[state], LOG_TYPE_DEBUG);
|
||||
}
|
||||
|
||||
BRM::DBRM dbrm;
|
||||
dbrm.setSystemQueryReady(true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user