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

MCOL-1694 & MCOL-1505 Improved exception handling

This patch catches exceptions in DDLProc, DMLProc and ExeMgr which could
potentially happen during startup. Logging them instead of silently
ignoring them (or crashing in ExeMgr).
This commit is contained in:
Andrew Hutchings
2018-09-07 11:43:54 +01:00
parent 81761840ac
commit 14d3a34c28
4 changed files with 123 additions and 4 deletions

View File

@ -1300,8 +1300,34 @@ void cleanTempDir()
assert(tmpPrefix != "/");
/* This is quite scary as ExeMgr usually runs as root */
boost::filesystem::remove_all(tmpPrefix);
boost::filesystem::create_directories(tmpPrefix);
try
{
boost::filesystem::remove_all(tmpPrefix);
boost::filesystem::create_directories(tmpPrefix);
}
catch (std::exception& ex)
{
cerr << ex.what() << endl;
LoggingID logid(16, 0, 0);
Message::Args args;
Message message(8);
args.add("Execption whilst cleaning tmpdir: ");
args.add(ex.what());
message.format( args );
logging::Logger logger(logid.fSubsysID);
logger.logMessage(LOG_TYPE_WARNING, message, logid);
}
catch (...)
{
cerr << "Caught unknown exception during tmpdir cleanup" << endl;
LoggingID logid(16, 0, 0);
Message::Args args;
Message message(8);
args.add("Unknown execption whilst cleaning tmpdir");
message.format( args );
logging::Logger logger(logid.fSubsysID);
logger.logMessage(LOG_TYPE_WARNING, message, logid);
}
}