mco_cluster_detach

This function allows the application to disconnect the node from the working cluster, without waiting for other nodes to complete their work.

For an overview see page Cluster Applications in C

Prototype

    MCO_RET mco_cluster_detach (/*IN*/ mco_db_h db)

Arguments

db
Connection to the database

Description

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).

Return Codes

MCO_S_OK
Cluster detached successfully

Files

Header file:
mcocluster.h
Source file:
mcocluster.c
Library:
libmcocluster.a