You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Changed how procmon kills StorageManager to allow it to shutdown
gracefully.
This commit is contained in:
@ -2223,6 +2223,22 @@ int ProcessMonitor::stopProcess(pid_t processID, std::string processName, std::s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sending sigkill to StorageManager right after sigterm would not allow it to
|
||||||
|
// exit gracefully. This will wait until StorageManager goes down to prevent
|
||||||
|
// weirdness that I suspect will happen if we combine a slow connection with a restart
|
||||||
|
// command.
|
||||||
|
if (processName == "StorageManager")
|
||||||
|
{
|
||||||
|
while (status == API_SUCCESS)
|
||||||
|
{
|
||||||
|
sleep(1);
|
||||||
|
log.writeLog(__LINE__, "Waiting for StorageManager to go away...", LOG_TYPE_DEBUG);
|
||||||
|
status = kill(processID, SIGTERM);
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
//now do a pkill on process just to make sure all is clean
|
//now do a pkill on process just to make sure all is clean
|
||||||
string::size_type pos = processLocation.find("bin/", 0);
|
string::size_type pos = processLocation.find("bin/", 0);
|
||||||
string procName = processLocation.substr(pos + 4, 15) + "\\*";
|
string procName = processLocation.substr(pos + 4, 15) + "\\*";
|
||||||
|
Reference in New Issue
Block a user