1
0
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:
David Hill
2018-08-10 18:37:40 -05:00
parent b5a39ea789
commit e903e47201
2 changed files with 19 additions and 5 deletions

View File

@@ -1249,6 +1249,9 @@ void processMSG(messageqcpp::IOSocket* cfIos)
log.writeLog(__LINE__, "STOPSYSTEM: ACK back to sender");
}
//set query system state ready
processManager.setQuerySystemState(true);
startsystemthreadStop = false;
break;
@@ -2848,6 +2851,7 @@ void processMSG(messageqcpp::IOSocket* cfIos)
// if a DDLProc was restarted, reinit DMLProc
if( processName == "DDLProc") {
processManager.reinitProcessType("DMLProc");
processManager.setQuerySystemState(true);
}
//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.setSystemState(oam::ACTIVE);
@@ -3773,6 +3777,7 @@ void ProcessManager::setSystemState(uint16_t state)
Oam oam;
ALARMManager aManager;
Configuration config;
ProcessManager processManager(config, log);
log.writeLog(__LINE__, "Set System State = " + oamState[state], LOG_TYPE_DEBUG);
@@ -3793,6 +3798,9 @@ void ProcessManager::setSystemState(uint16_t state)
// Process Alarms
string system = "System";
if( state == oam::ACTIVE ) {
//set query system states ready
processManager.setQuerySystemState(true);
//clear alarms if set
aManager.sendAlarmReport(system.c_str(), SYSTEM_DOWN_AUTO, 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
processManager.setQuerySystemState(true);
processManager.setQuerySystemState(false);
// Bug 4554: Wait until DMLProc is finished with rollback
if (status == oam::API_SUCCESS)
@@ -7061,6 +7069,9 @@ void startSystemThread(oam::DeviceNetworkList Devicenetworklist)
processManager.setSystemState(rtn);
}
//set query system state ready
processManager.setQuerySystemState(true);
// exit thread
log.writeLog(__LINE__, "startSystemThread Exit", LOG_TYPE_DEBUG);
startsystemthreadStatus = status;

View File

@@ -336,7 +336,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();
sleep(1);
@@ -1333,7 +1333,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) {
@@ -1530,7 +1530,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);
}
}
}
@@ -2455,6 +2455,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;