Description.
Like the other
ndb_mgm_stop
functions, this function stops one or more data nodes. Like
*()ndb_mgm_stop2(), it offers
the ability to specify whether the nodes should shut down
gracefully; like
ndb_mgm_stop3() it provides
for a way to check to see whether disconnection is required
prior to stopping a node. In addition, it is possible to
force the node to shut down even if this would cause the
cluster to become nonviable.
This function was added in MySQL Cluster NDB 7.0.19 and MySQL Cluster NDB 7.1.8.
Signature.
int ndb_mgm_stop4
(
NdbMgmHandle handle,
int number,
const int* list,
int abort,
int force,
int* disconnect
)
Parameters.
ndb_mgm_stop4() takes 6 parameters:
An NdbMgmHandle.
The number of nodes to be
stopped. Use 0 to stop all of the data
nodes in the cluster.
A list of the node IDs of the
nodes to be stopped.
The value of abort determines
how the nodes will be shut down. 1
indicates the nodes will shut down immediately;
0 indicates that the nodes will stop
gracefully.
The value of force determines
the action to be taken in the event that the shutdown of a
given node would cause an incomplete cluster.
1 causes the node—and the entire
cluster—to be shut down in such cases,
0 means the node will not be shut down.
Beginning with MySQL Cluster NDB 7.0.21 and MySQL Cluster
NDB 7.1.10, setting force equal
to 1 also makes it possible to stop a node even while
other nodes are starting. (Bug #58451)
If disconnect returns
1 (true), this means
the you must disconnect before you can apply the command
to stop. For example, disconnecting is required when
stopping the management server to which the handle is
connected.
Return value.
The number of nodes actually stopped; in the event of
failure, -1 is returned.
