summaryrefslogtreecommitdiff
path: root/ndb/src/mgmapi
diff options
context:
space:
mode:
authortomas@poseidon.ndb.mysql.com <>2006-04-26 16:57:45 +0200
committertomas@poseidon.ndb.mysql.com <>2006-04-26 16:57:45 +0200
commitee3bdf586b128b4985730df9ff4c598b4423d0d9 (patch)
treed43661c653b11d5f2a61900dba2839a1a65251b4 /ndb/src/mgmapi
parentedba345e568ec5b4234a1dc8e9a39f2655307e69 (diff)
downloadmariadb-git-ee3bdf586b128b4985730df9ff4c598b4423d0d9.tar.gz
Bug #18550 ndbd getting "node failure handling not complete..." after graceful restart
- addded more retries to wait for nodefailure to complete Bug #19039 multi node failure causes node failure handling not to complete - patch to avoid this scenario when the management server is used to perform the stop - wait for NF_COMPLETE_REP in management server before returning ndb: allocate nodeid - only retry on retryable error
Diffstat (limited to 'ndb/src/mgmapi')
-rw-r--r--ndb/src/mgmapi/mgmapi.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp
index b02367a8870..f99478a8cea 100644
--- a/ndb/src/mgmapi/mgmapi.cpp
+++ b/ndb/src/mgmapi/mgmapi.cpp
@@ -1868,7 +1868,8 @@ const char *ndb_mgm_get_connectstring(NdbMgmHandle handle, char *buf, int buf_sz
extern "C"
int
-ndb_mgm_alloc_nodeid(NdbMgmHandle handle, unsigned int version, int nodetype)
+ndb_mgm_alloc_nodeid(NdbMgmHandle handle, unsigned int version, int nodetype,
+ int log_event)
{
CHECK_HANDLE(handle, 0);
CHECK_CONNECTED(handle, 0);
@@ -1888,9 +1889,11 @@ ndb_mgm_alloc_nodeid(NdbMgmHandle handle, unsigned int version, int nodetype)
args.put("endian", (endian_check.c[sizeof(long)-1])?"big":"little");
if (handle->m_name)
args.put("name", handle->m_name);
+ args.put("log_event", log_event);
const ParserRow<ParserDummy> reply[]= {
MGM_CMD("get nodeid reply", NULL, ""),
+ MGM_ARG("error_code", Int, Optional, "Error code"),
MGM_ARG("nodeid", Int, Optional, "Error message"),
MGM_ARG("result", String, Mandatory, "Error message"),
MGM_END()
@@ -1903,14 +1906,16 @@ ndb_mgm_alloc_nodeid(NdbMgmHandle handle, unsigned int version, int nodetype)
nodeid= -1;
do {
const char * buf;
- if(!prop->get("result", &buf) || strcmp(buf, "Ok") != 0){
+ if (!prop->get("result", &buf) || strcmp(buf, "Ok") != 0)
+ {
const char *hostname= ndb_mgm_get_connected_host(handle);
unsigned port= ndb_mgm_get_connected_port(handle);
BaseString err;
+ Uint32 error_code= NDB_MGM_ALLOCID_ERROR;
err.assfmt("Could not alloc node id at %s port %d: %s",
hostname, port, buf);
- setError(handle, NDB_MGM_COULD_NOT_CONNECT_TO_SOCKET, __LINE__,
- err.c_str());
+ prop->get("error_code", &error_code);
+ setError(handle, error_code, __LINE__, err.c_str());
break;
}
Uint32 _nodeid;