1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Merge pull request #1004 from pleblanc1976/runtime-disable-oam

Runtime disable oam
This commit is contained in:
Andrew Hutchings
2020-01-17 10:31:05 -08:00
committed by Patrick LeBlanc
parent a7724ac3c7
commit 5ff131e726
10 changed files with 81 additions and 82 deletions

View File

@ -618,35 +618,35 @@ int RedistributeControlThread::executeRedistributePlan()
try
{
// skip system status check in case no OAM
#if !defined(_MSC_VER) && !defined(SKIP_OAM_INIT)
// make sure system is in active state
bool isActive = false;
while (!isActive)
if (getenv("SKIP_OAM_INIT") == NULL)
{
bool noExcept = true;
SystemStatus systemstatus;
// make sure system is in active state
bool isActive = false;
try
while (!isActive)
{
fControl->fOam->getSystemStatus(systemstatus);
}
catch (const std::exception& ex)
{
fErrorMsg += ex.what();
noExcept = false;
}
catch (...)
{
noExcept = false;
}
bool noExcept = true;
SystemStatus systemstatus;
if (noExcept && ((isActive = (systemstatus.SystemOpState == oam::ACTIVE)) == false))
sleep(1);;
try
{
fControl->fOam->getSystemStatus(systemstatus);
}
catch (const std::exception& ex)
{
fErrorMsg += ex.what();
noExcept = false;
}
catch (...)
{
noExcept = false;
}
if (noExcept && ((isActive = (systemstatus.SystemOpState == oam::ACTIVE)) == false))
sleep(1);;
}
}
#endif
if (fStopAction)
return RED_EC_USER_STOP;
@ -851,4 +851,3 @@ void RedistributeControlThread::doStopAction()
} // namespace
// vim:ts=4 sw=4: