removed unnecesary check in ConfigInfo

added retries to tryBind


ndb/src/common/mgmcommon/ConfigInfo.cpp:
  removed unnecesary check in ConfigInfo
ndb/src/mgmsrv/main.cpp:
  added retries to tryBind
This commit is contained in:
unknown 2004-09-08 16:31:52 +00:00
parent 13de9798fd
commit 9b44664537
2 changed files with 7 additions and 4 deletions

View File

@ -3118,9 +3118,7 @@ check_node_vs_replicas(Vector<ConfigInfo::ConfigRuleSection>&sections,
{
Uint32 db_nodes = 0;
Uint32 replicas = 0;
if (!ctx.m_userProperties.get("DB", &db_nodes)) {
return true;
}
ctx.m_userProperties.get("DB", &db_nodes);
ctx.m_userProperties.get("NoOfReplicas", &replicas);
if((db_nodes % replicas) != 0){
ctx.reportError("Invalid no of db nodes wrt no of replicas.\n"

View File

@ -180,7 +180,12 @@ NDB_MAIN(mgmsrv){
glob.use_specific_ip = false;
if(!glob.use_specific_ip){
if(!glob.socketServer->tryBind(glob.port, glob.interface_name)){
int count= 5; // no of retries for tryBind
while(!glob.socketServer->tryBind(glob.port, glob.interface_name)){
if (--count > 0) {
NdbSleep_MilliSleep(1000);
continue;
}
ndbout_c("Unable to setup port: %s:%d!\n"
"Please check if the port is already used,\n"
"(perhaps a ndb_mgmd is already running),\n"