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

MCOL-553 Improve error handling for ulimit

Now sends an error to the error log and aborts postConfigure
This commit is contained in:
Andrew Hutchings
2017-02-21 21:10:57 +00:00
parent 788ffd3149
commit 80b4d7ee36
3 changed files with 82 additions and 32 deletions

View File

@ -130,27 +130,7 @@ int main(int argc, char** argv)
idbdatafile::IDBPolicy::configIDBPolicy();
#endif
Config weConfig;
int err = setupResources();
switch (err)
{
case -1:
case -3:
cerr << "Error getting file limits, please see non-root install documentation" << endl;
return -1;
break;
case -2:
cerr << "Error setting file limits, please see non-root install documentation" << endl;
return -1;
break;
case -4:
cerr << "Could not install file limits to required value, please see non-root install documentation" << endl;
return -1;
break;
default:
break;
}
ostringstream serverParms;
serverParms << "pm" << weConfig.getLocalModuleID() << "_WriteEngineServer";
@ -205,6 +185,45 @@ int main(int argc, char** argv)
}
}
int err = setupResources();
string errMsg;
switch (err)
{
case -1:
case -3:
errMsg = "Error getting file limits, please see non-root install documentation";
break;
case -2:
errMsg = "Error setting file limits, please see non-root install documentation";
break;
case -4:
errMsg = "Could not install file limits to required value, please see non-root install documentation";
break;
default:
break;
}
if (err < 0)
{
Oam oam;
logging::Message::Args args;
logging::Message message;
args.add( errMsg );
message.format(args);
logging::LoggingID lid(SUBSYSTEM_ID_WE_SRV);
logging::MessageLog ml(lid);
ml.logCriticalMessage( message );
cerr << errMsg << endl;
try
{
oam.processInitFailure();
}
catch (...)
{
}
return 2;
}
IOSocket ios;
size_t mt = 20;
size_t qs = mt * 100;