1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-29 03:22:01 +03:00

MCOL-787 - merged code from 1.0.10

This commit is contained in:
David Hill
2017-07-27 10:26:43 -05:00
parent 478b6ff5fa
commit f17c2e1820
2 changed files with 29 additions and 13 deletions

View File

@@ -6955,9 +6955,14 @@ void startSystemThread(oam::DeviceNetworkList Devicenetworklist)
processManager.setSystemState(rtn); processManager.setSystemState(rtn);
} }
//run command to build system table if they don't already exist //run command to build system table if they don't already exist
processManager.buildSystemTables("pm1"); sleep(5);
int ret = processManager.buildSystemTables("pm1");
if (ret == oam::API_SUCCESS )
log.writeLog(__LINE__, "System Catalog Successfully Built by ProcMgr", LOG_TYPE_DEBUG);
else
log.writeLog(__LINE__, "System Catalog Successfully not built by ProcMgr, ret code = " + oam.itoa(ret), LOG_TYPE_DEBUG);
// exit thread // exit thread
log.writeLog(__LINE__, "startSystemThread Exit", LOG_TYPE_DEBUG); log.writeLog(__LINE__, "startSystemThread Exit", LOG_TYPE_DEBUG);
startsystemthreadStatus = status; startsystemthreadStatus = status;

View File

@@ -3527,17 +3527,28 @@ int ProcessMonitor::buildSystemTables()
string fileName = DBdir + "/000.dir"; string fileName = DBdir + "/000.dir";
if (!IDBPolicy::exists(fileName.c_str())) { //check if postConfigure or dbbuilder is already running
string logdir("/var/log/mariadb/columnstore"); string cmd = "ps aux | grep postConfigure | grep -v grep";
if (access(logdir.c_str(), W_OK) != 0) logdir = "/tmp"; int rtnCode = system(cmd.c_str());
string cmd = startup::StartUp::installDir() + "/bin/dbbuilder 7 > " + logdir + "/dbbuilder.log &"; if (WEXITSTATUS(rtnCode) == 0)
system(cmd.c_str()); return API_ALREADY_IN_PROGRESS;
log.writeLog(__LINE__, "buildSystemTables: dbbuilder 7 Successfully Launched" , LOG_TYPE_DEBUG); cmd = "ps aux | grep dbbuilder | grep -v grep";
return API_SUCCESS; rtnCode = system(cmd.c_str());
} if (WEXITSTATUS(rtnCode) == 0)
log.writeLog(__LINE__, "buildSystemTables: System Tables Already Exist", LOG_TYPE_ERROR ); return API_ALREADY_IN_PROGRESS;
return API_FILE_ALREADY_EXIST;
if (!IDBPolicy::exists(fileName.c_str())) {
string logdir("/var/log/mariadb/columnstore");
if (access(logdir.c_str(), W_OK) != 0) logdir = "/tmp";
string cmd = startup::StartUp::installDir() + "/bin/dbbuilder 7 > " + logdir + "/dbbuilder.log &";
system(cmd.c_str());
log.writeLog(__LINE__, "buildSystemTables: dbbuilder 7 Successfully Launched" , LOG_TYPE_DEBUG);
return API_SUCCESS;
}
log.writeLog(__LINE__, "buildSystemTables: System Tables Already Exist", LOG_TYPE_DEBUG );
return API_FILE_ALREADY_EXIST;
} }
/****************************************************************************************** /******************************************************************************************