Below is the list of changes that have just been committed into a local
5.1 repository of justin.he. When justin.he does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-11-14 10:28:56+08:00, Justin.He@stripped +1 -0
BUG#23546, Cluster configured without any arbitration
storage/ndb/src/mgmsrv/ConfigInfo.cpp@stripped, 2006-11-14 10:28:13+08:00,
Justin.He@stripped +11 -0
add check whether MGM and API are configured with arbitrator,
if both of them are not, terminate ndb_mgmd and show err message.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: Justin.He
# Host: dev3-47.dev.cn.tlan
# Root: /mnt/sda7/justin.he/mysql/mysql-5.1/bug23546-5.1-new-ndb-bj
--- 1.91/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2006-11-14 10:29:06 +08:00
+++ 1.92/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2006-11-14 10:29:06 +08:00
@@ -3761,6 +3761,7 @@
Uint32 db_nodes= 0;
Uint32 replicas= 0;
Uint32 db_host_count= 0;
+ bool with_arbitration_rank = false; //stands for whether the cluster is configured
with arbitrator
ctx.m_userProperties.get(DB_TOKEN, &db_nodes);
ctx.m_userProperties.get("NoOfReplicas", &replicas);
if((db_nodes % replicas) != 0){
@@ -3868,11 +3869,21 @@
{
arbitration_warning.appfmt(arbit_warn_fmt2, i);
}
+ if (with_arbitration_rank == false)
+ with_arbitration_rank = true; //check whether MGM or API node configured with rank
>0
}
}
}
if (db_host_count > 1 && node_group_warning.length() > 0)
ndbout_c("Cluster configuration warning:\n%s",node_group_warning.c_str());
+ if (with_arbitration_rank != true) {
+ arbitration_warning.appfmt("Cluster configuration error:"
+ "\n Neither %s nor %s nodes are configured with arbitrator,"
+ "\n may cause complete cluster shutdown in case of host failure.",
+ MGM_TOKEN, API_TOKEN);
+ ndbout_c(arbitration_warning.c_str());
+ return false;
+ }
if (db_host_count > 1 && arbitration_warning.length() > 0)
ndbout_c("Cluster configuration warning:%s%s",arbitration_warning.c_str(),
"\n Running arbitrator on the same host as a database node may"
| Thread |
|---|
| • bk commit into 5.1 tree (Justin.He:1.2320) BUG#23546 | jhe | 14 Nov |