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

MCOL-520 - check storage type before unmount

This commit is contained in:
David Hill
2018-11-07 09:29:55 -06:00
parent 142f04aeeb
commit deba5d2a10

View File

@ -1035,10 +1035,20 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
cacheutils::dropPrimProcFdCache();
flushInodeCache();
string cmd = SUDO + "umount " + startup::StartUp::installDir() + "/data* -l > /dev/null 2>&1";
try
{
string DBRootStorageType = "internal";
oam.getSystemConfig("DBRootStorageType", DBRootStorageType);
system(cmd.c_str());
sleep(1);
if ( DBRootStorageType == "external" )
{
string cmd = SUDO + "umount " + startup::StartUp::installDir() + "/data* -l > /dev/null 2>&1";
system(cmd.c_str());
sleep(1);
}
}
catch (...) {}
system("rpm -e --nodeps $(rpm -qa | grep '^mariadb-columnstore')");
system("dpkg -P $(dpkg --get-selections | grep '^mariadb-columnstore')");