You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-11-25 20:23:16 +03:00
MCOL-3842: make sure fuser -k command completes and message thread has started fully before continuing.
This commit is contained in:
@@ -47,6 +47,7 @@ using namespace threadpool;
|
|||||||
using namespace config;
|
using namespace config;
|
||||||
|
|
||||||
bool runStandby = false;
|
bool runStandby = false;
|
||||||
|
bool MsgThreadActive = false;
|
||||||
bool runCold = false;
|
bool runCold = false;
|
||||||
string systemName = "system";
|
string systemName = "system";
|
||||||
string iface_name;
|
string iface_name;
|
||||||
@@ -412,6 +413,8 @@ int main(int argc, char** argv)
|
|||||||
log.writeLog(__LINE__, "ERROR: makeConfig failed", LOG_TYPE_ERROR);
|
log.writeLog(__LINE__, "ERROR: makeConfig failed", LOG_TYPE_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// This will never work.....
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
oam.distributeConfigFile();
|
oam.distributeConfigFile();
|
||||||
@@ -474,8 +477,6 @@ static void messageThread(Configuration config)
|
|||||||
sleep (1);
|
sleep (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
log.writeLog(__LINE__, "Message Thread started ..", LOG_TYPE_DEBUG);
|
|
||||||
|
|
||||||
//read and cleanup port before trying to use
|
//read and cleanup port before trying to use
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -489,6 +490,8 @@ static void messageThread(Configuration config)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.writeLog(__LINE__, "Message Thread started ..", LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
//
|
//
|
||||||
//waiting for request
|
//waiting for request
|
||||||
//
|
//
|
||||||
@@ -499,7 +502,7 @@ static void messageThread(Configuration config)
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
MessageQueueServer procmgr("ProcMgr");
|
MessageQueueServer procmgr("ProcMgr");
|
||||||
|
MsgThreadActive = true;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ pthread_mutex_t THREAD_LOCK;
|
|||||||
extern string cloud;
|
extern string cloud;
|
||||||
extern bool amazon;
|
extern bool amazon;
|
||||||
extern bool runStandby;
|
extern bool runStandby;
|
||||||
|
extern bool MsgThreadActive;
|
||||||
extern string iface_name;
|
extern string iface_name;
|
||||||
extern string PMInstanceType;
|
extern string PMInstanceType;
|
||||||
extern string UMInstanceType;
|
extern string UMInstanceType;
|
||||||
@@ -9187,6 +9188,14 @@ int ProcessManager::switchParentOAMModule(std::string newActiveModuleName)
|
|||||||
|
|
||||||
//clear run standby flag;
|
//clear run standby flag;
|
||||||
runStandby = false;
|
runStandby = false;
|
||||||
|
int retryCount = 0;
|
||||||
|
//sleep, give time for message thread to startup
|
||||||
|
while (!MsgThreadActive && retryCount < 5)
|
||||||
|
{
|
||||||
|
log.writeLog(__LINE__, "Waiting for Message Thread...", LOG_TYPE_DEBUG);
|
||||||
|
sleep(5);
|
||||||
|
++retryCount;
|
||||||
|
}
|
||||||
|
|
||||||
int moduleID = atoi(newActiveModuleName.substr(MAX_MODULE_TYPE_SIZE, MAX_MODULE_ID_SIZE).c_str());
|
int moduleID = atoi(newActiveModuleName.substr(MAX_MODULE_TYPE_SIZE, MAX_MODULE_ID_SIZE).c_str());
|
||||||
|
|
||||||
@@ -9922,9 +9931,14 @@ int ProcessManager::OAMParentModuleChange()
|
|||||||
|
|
||||||
//clear run standby flag;
|
//clear run standby flag;
|
||||||
runStandby = false;
|
runStandby = false;
|
||||||
|
int retryCount = 0;
|
||||||
//sleep, give time for message thread to startup
|
//sleep, give time for message thread to startup
|
||||||
|
while (!MsgThreadActive && retryCount < 5)
|
||||||
|
{
|
||||||
|
log.writeLog(__LINE__, "Waiting for Message Thread...", LOG_TYPE_DEBUG);
|
||||||
sleep(5);
|
sleep(5);
|
||||||
|
++retryCount;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user