This function allows the application to disconnect the node from the working cluster, without waiting for other nodes to complete their work.
MCO_RET mco_cluster_detach ( /*IN*/ mco_db_h db)
| db | Connection to the database |
This function allows the application to disconnect the node from the working cluster, without waiting for other nodes to complete their work. After calling mco_cluster_detach(), the database allows full (READ and WRITE) access. Also, mco_cluster_detach() decreases the total sum of qranks (excludes this node's qrank from the total amount).
For example, consider a cluster consisting of 2 nodes (A and B) with qrank = 1. If one of the nodes goes down, the other will stop WRITE processing - it has no quorum (because 1 is not greater then (1+1)/2). But if one of the nodes calls mco_cluster_detach(), the total qrank amount wiil be 1, and the other node can continue WRITE operations (because 1 is greater than 1/2).
| MCO_S_OK | Cluster detached successfully |