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:
parent
13de9798fd
commit
9b44664537
@ -3118,9 +3118,7 @@ check_node_vs_replicas(Vector<ConfigInfo::ConfigRuleSection>§ions,
|
||||
{
|
||||
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"
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user