You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
MCOL-1523 - fix issue with query failing and enablemodule failing trying to get um1 back.
This commit is contained in:
@@ -1249,6 +1249,9 @@ void processMSG(messageqcpp::IOSocket* cfIos)
|
|||||||
log.writeLog(__LINE__, "STOPSYSTEM: ACK back to sender");
|
log.writeLog(__LINE__, "STOPSYSTEM: ACK back to sender");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//set query system state ready
|
||||||
|
processManager.setQuerySystemState(true);
|
||||||
|
|
||||||
startsystemthreadStop = false;
|
startsystemthreadStop = false;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -2848,6 +2851,7 @@ void processMSG(messageqcpp::IOSocket* cfIos)
|
|||||||
// if a DDLProc was restarted, reinit DMLProc
|
// if a DDLProc was restarted, reinit DMLProc
|
||||||
if( processName == "DDLProc") {
|
if( processName == "DDLProc") {
|
||||||
processManager.reinitProcessType("DMLProc");
|
processManager.reinitProcessType("DMLProc");
|
||||||
|
processManager.setQuerySystemState(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//only run on auto process restart
|
//only run on auto process restart
|
||||||
@@ -2894,7 +2898,7 @@ void processMSG(messageqcpp::IOSocket* cfIos)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//enable query stats
|
//set query system states ready
|
||||||
processManager.setQuerySystemState(true);
|
processManager.setQuerySystemState(true);
|
||||||
|
|
||||||
processManager.setSystemState(oam::ACTIVE);
|
processManager.setSystemState(oam::ACTIVE);
|
||||||
@@ -3773,6 +3777,7 @@ void ProcessManager::setSystemState(uint16_t state)
|
|||||||
Oam oam;
|
Oam oam;
|
||||||
ALARMManager aManager;
|
ALARMManager aManager;
|
||||||
Configuration config;
|
Configuration config;
|
||||||
|
ProcessManager processManager(config, log);
|
||||||
|
|
||||||
log.writeLog(__LINE__, "Set System State = " + oamState[state], LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "Set System State = " + oamState[state], LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
@@ -3793,6 +3798,9 @@ void ProcessManager::setSystemState(uint16_t state)
|
|||||||
// Process Alarms
|
// Process Alarms
|
||||||
string system = "System";
|
string system = "System";
|
||||||
if( state == oam::ACTIVE ) {
|
if( state == oam::ACTIVE ) {
|
||||||
|
//set query system states ready
|
||||||
|
processManager.setQuerySystemState(true);
|
||||||
|
|
||||||
//clear alarms if set
|
//clear alarms if set
|
||||||
aManager.sendAlarmReport(system.c_str(), SYSTEM_DOWN_AUTO, CLEAR);
|
aManager.sendAlarmReport(system.c_str(), SYSTEM_DOWN_AUTO, CLEAR);
|
||||||
aManager.sendAlarmReport(system.c_str(), SYSTEM_DOWN_MANUAL, CLEAR);
|
aManager.sendAlarmReport(system.c_str(), SYSTEM_DOWN_MANUAL, CLEAR);
|
||||||
@@ -6992,7 +7000,7 @@ void startSystemThread(oam::DeviceNetworkList Devicenetworklist)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//set query system state not ready
|
//set query system state not ready
|
||||||
processManager.setQuerySystemState(true);
|
processManager.setQuerySystemState(false);
|
||||||
|
|
||||||
// Bug 4554: Wait until DMLProc is finished with rollback
|
// Bug 4554: Wait until DMLProc is finished with rollback
|
||||||
if (status == oam::API_SUCCESS)
|
if (status == oam::API_SUCCESS)
|
||||||
@@ -7061,6 +7069,9 @@ void startSystemThread(oam::DeviceNetworkList Devicenetworklist)
|
|||||||
processManager.setSystemState(rtn);
|
processManager.setSystemState(rtn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//set query system state ready
|
||||||
|
processManager.setQuerySystemState(true);
|
||||||
|
|
||||||
// exit thread
|
// exit thread
|
||||||
log.writeLog(__LINE__, "startSystemThread Exit", LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "startSystemThread Exit", LOG_TYPE_DEBUG);
|
||||||
startsystemthreadStatus = status;
|
startsystemthreadStatus = status;
|
||||||
|
@@ -336,7 +336,7 @@ int main(int argc, char **argv)
|
|||||||
sysConfig->setConfig("ProcMgr_Alarm", "IPAddr", IPaddr);
|
sysConfig->setConfig("ProcMgr_Alarm", "IPAddr", IPaddr);
|
||||||
|
|
||||||
log.writeLog(__LINE__, "set ProcMgr IPaddr to Old Standby Module: " + IPaddr, LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "set ProcMgr IPaddr to Old Standby Module: " + IPaddr, LOG_TYPE_DEBUG);
|
||||||
//update Calpont Config table
|
//update MariaDB ColumnStore Config table
|
||||||
try {
|
try {
|
||||||
sysConfig->write();
|
sysConfig->write();
|
||||||
sleep(1);
|
sleep(1);
|
||||||
@@ -1333,7 +1333,7 @@ static void chldHandleThread(MonitorConfig config)
|
|||||||
(*listPtr).processID != 0 ) ||
|
(*listPtr).processID != 0 ) ||
|
||||||
( (*listPtr).state == oam::ACTIVE && (*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 ||
|
if ( (*listPtr).dieCounter >= processRestartCount ||
|
||||||
processRestartCount == 0) {
|
processRestartCount == 0) {
|
||||||
@@ -1530,7 +1530,7 @@ static void chldHandleThread(MonitorConfig config)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Log this event
|
//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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2455,6 +2455,9 @@ void processStatusMSG(messageqcpp::IOSocket* cfIos)
|
|||||||
memcpy(fShmSystemStatus[0].StateChangeDate, oam.getCurrentTime().c_str(), DATESIZE);
|
memcpy(fShmSystemStatus[0].StateChangeDate, oam.getCurrentTime().c_str(), DATESIZE);
|
||||||
log.writeLog(__LINE__, "statusControl: REQUEST RECEIVED: Set System State = " + oamState[state], LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "statusControl: REQUEST RECEIVED: Set System State = " + oamState[state], LOG_TYPE_DEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BRM::DBRM dbrm;
|
||||||
|
dbrm.setSystemQueryReady(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user