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

MCOL-553 Error if we can't set file limits

Especially for non-root installs. Otherwise we could be in for some pain
later...
This commit is contained in:
Andrew Hutchings
2017-02-08 17:13:30 +00:00
parent 4967c5a6d8
commit 739f61a1ef
3 changed files with 59 additions and 9 deletions

View File

@ -1342,7 +1342,26 @@ int main(int argc, char* argv[])
setenv("CALPONT_CSC_IDENT", "um", 1); setenv("CALPONT_CSC_IDENT", "um", 1);
#endif #endif
setupSignalHandlers(); setupSignalHandlers();
setupResources(); 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;
}
setupCwd(rm); setupCwd(rm);

View File

@ -296,13 +296,25 @@ int main(int argc, char* argv[])
mlp = new primitiveprocessor::Logger(); mlp = new primitiveprocessor::Logger();
int rc; int err = setupResources();
rc = setupResources(); switch (err)
if (rc) { {
Message::Args args; case -1:
args.add(rc); case -3:
//mlp->logMessage(logging::M0016, args); 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;
}
int serverThreads = 1; int serverThreads = 1;
int serverQueueSize = 10; int serverQueueSize = 10;

View File

@ -130,7 +130,26 @@ int main(int argc, char** argv)
idbdatafile::IDBPolicy::configIDBPolicy(); idbdatafile::IDBPolicy::configIDBPolicy();
#endif #endif
Config weConfig; Config weConfig;
setupResources(); 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; ostringstream serverParms;
serverParms << "pm" << weConfig.getLocalModuleID() << "_WriteEngineServer"; serverParms << "pm" << weConfig.getLocalModuleID() << "_WriteEngineServer";