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
restart DMLProc again after failover to fix locking issues on rollback
This commit is contained in:
@@ -2486,8 +2486,37 @@ void pingDeviceThread()
|
|||||||
log.writeLog(__LINE__, "'dbrmctl resume' done", LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "'dbrmctl resume' done", LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
//set recycle process
|
//set recycle process
|
||||||
//processManager.recycleProcess(moduleName);
|
// waiting until dml are ACTIVE
|
||||||
//processManager.reinitProcesses();
|
// disableModule is going to trigger DMLProc to restart wait for it
|
||||||
|
int retry = 0;
|
||||||
|
while (retry < 30)
|
||||||
|
{
|
||||||
|
ProcessStatus DMLprocessstatus;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
oam.getProcessStatus("DMLProc", config.moduleName(), DMLprocessstatus);
|
||||||
|
}
|
||||||
|
catch (exception& ex)
|
||||||
|
{}
|
||||||
|
catch (...)
|
||||||
|
{}
|
||||||
|
|
||||||
|
if (DMLprocessstatus.ProcessOpState == oam::BUSY_INIT)
|
||||||
|
log.writeLog(__LINE__, "Waiting for DMLProc to finish rollback", LOG_TYPE_DEBUG);
|
||||||
|
|
||||||
|
if (DMLprocessstatus.ProcessOpState == oam::ACTIVE)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (DMLprocessstatus.ProcessOpState == oam::FAILED)
|
||||||
|
break;
|
||||||
|
|
||||||
|
// wait some more
|
||||||
|
sleep(2);
|
||||||
|
++retry;
|
||||||
|
}
|
||||||
|
// restart DMLProc again to retrigger rollback with all dbroots connected
|
||||||
|
processManager.restartProcessType("DMLProc");
|
||||||
//set query system state ready
|
//set query system state ready
|
||||||
processManager.setQuerySystemState(true);
|
processManager.setQuerySystemState(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user