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

Changed how procmon kills StorageManager to allow it to shutdown

gracefully.
This commit is contained in:
Patrick LeBlanc
2019-06-12 13:32:24 -05:00
parent 753139a933
commit 42b6776598

View File

@ -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
string::size_type pos = processLocation.find("bin/", 0);
string procName = processLocation.substr(pos + 4, 15) + "\\*";