Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

MySQL NDB Cluster API Developer Guide  /  ...  /  Ndb_cluster_connection::set_data_node_neighbour() Ndb_cluster_connection::set_data_node_neighbour()

Description.  Set data node neighbor of the connection, used for optimal placement of the transaction coordinator. This method be used after creating the Ndb_cluster_connection, but prior to starting any query threads. This is due to the fact that this method may change the internal state of the Ndb_cluster_connection shared by the threads using it. This state is not thread-safe; changing it can lead to non-optimal node selection at the time of the change.

You can use the ndb_data_node_neighbour server system variable to set a data node neighbor for an NDB Cluster SQL node.

This method was added in NDB 7.5.2.


void set_data_node_neighbour
      Uint32 neighbour_node

Parameters.  The ID of the node to be used as the neighbor.

Return value.  None.