ndb: added some missing error codes to mgmapi
ndb: ndb_waiter disconnect/reconnect on get status error
This commit is contained in:
parent
3559bdb7b6
commit
9432143bee
@ -638,10 +638,12 @@ ndb_mgm_get_status(NdbMgmHandle handle)
|
|||||||
Vector<BaseString> split;
|
Vector<BaseString> split;
|
||||||
tmp.split(split, ":");
|
tmp.split(split, ":");
|
||||||
if(split.size() != 2){
|
if(split.size() != 2){
|
||||||
|
SET_ERROR(handle, NDB_MGM_ILLEGAL_NODE_STATUS, buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(split[0].trim() == "nodes")){
|
if(!(split[0].trim() == "nodes")){
|
||||||
|
SET_ERROR(handle, NDB_MGM_ILLEGAL_NODE_STATUS, buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -690,6 +692,7 @@ ndb_mgm_get_status(NdbMgmHandle handle)
|
|||||||
|
|
||||||
if(i+1 != noOfNodes){
|
if(i+1 != noOfNodes){
|
||||||
free(state);
|
free(state);
|
||||||
|
SET_ERROR(handle, NDB_MGM_ILLEGAL_NODE_STATUS, "Node count mismatch");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,6 +129,12 @@ getStatus(){
|
|||||||
ndbout << "status==NULL, retries="<<retries<<endl;
|
ndbout << "status==NULL, retries="<<retries<<endl;
|
||||||
MGMERR(handle);
|
MGMERR(handle);
|
||||||
retries++;
|
retries++;
|
||||||
|
ndb_mgm_disconnect(handle);
|
||||||
|
if (ndb_mgm_connect(handle,0,0,1)) {
|
||||||
|
MGMERR(handle);
|
||||||
|
g_err << "Reconnect failed" << endl;
|
||||||
|
break;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int count = status->no_of_nodes;
|
int count = status->no_of_nodes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user