MySQL Shell  8.0.14
Unified development interface for MySQL Products
Methods | Properties | List of all members
Cluster Class Reference

Represents an InnoDB cluster. More...

Methods

Undefined addInstance (InstanceDef instance, Dictionary options)
 Adds an Instance to the cluster. More...
 
Dictionary checkInstanceState (InstanceDef instance)
 Verifies the instance gtid state in relation to the cluster. More...
 
String describe ()
 Describe the structure of the cluster. More...
 
Undefined disconnect ()
 Disconnects all internal sessions used by the cluster object. More...
 
Undefined dissolve (Dictionary options)
 Dissolves the cluster. More...
 
Undefined forceQuorumUsingPartitionOf (InstanceDef instance, String password)
 Restores the cluster from quorum loss. More...
 
String getName ()
 Retrieves the name of the cluster. More...
 
Undefined rejoinInstance (InstanceDef instance, Dictionary options)
 Rejoins an Instance to the cluster. More...
 
Undefined removeInstance (InstanceDef instance, Dictionary options)
 Removes an Instance from the cluster. More...
 
Undefined rescan (Dictionary options)
 Rescans the cluster. More...
 
String status (Dictionary options)
 Describe the status of the cluster. More...
 
Undefined switchToSinglePrimaryMode (InstanceDef instance)
 Switches the cluster to single-primary mode. More...
 
Undefined switchToMultiPrimaryMode ()
 Switches the cluster to multi-primary mode. More...
 
Undefined setPrimaryInstance (InstanceDef instance)
 Switches the cluster to single-primary mode. More...
 
String options (Dictionary options)
 Lists the cluster configuration options. More...
 
Undefined setOption (String option, String value)
 Changes the value of a configuration option for the whole cluster. More...
 
Undefined setInstanceOption (InstanceDef instance, String option, String value)
 Changes the value of a configuration option in a Cluster member. More...
 
void sync_transactions (const mysqlshdk::mysql::IInstance &target_instance) const
 Synchronize transactions on target instance. More...
 
void invalidate ()
 Mark the cluster as invalid (e.g., dissolved).
 

Properties

String name
 Retrieves the name of the cluster.
 

Detailed Description

Represents an InnoDB cluster.

Member Function Documentation

◆ addInstance()

Undefined addInstance ( InstanceDef  instance,
Dictionary  options 
)

Adds an Instance to the cluster.

Parameters
instanceAn instance definition.
optionsOptional dictionary with options for the operation.

MetadataError in the following scenarios:

  • If the Metadata is inaccessible.
  • If the Metadata update operation failed. ArgumentError in the following scenarios:
  • If the instance parameter is empty.
  • If the instance definition is invalid.
  • If the instance definition is a connection dictionary but empty.
  • If the value for the memberSslMode option is not one of the allowed: "AUTO", "DISABLED", "REQUIRED".
  • If the value for the ipWhitelist, localAddress, groupSeeds, or exitStateAction options is empty.
  • If the instance definition cannot be used for Group Replication. RuntimeError in the following scenarios:
  • If the instance accounts are invalid.
  • If the instance is not in bootstrapped state.
  • If the SSL mode specified is not compatible with the one used in the cluster.
  • If the value for the localAddress, groupSeeds, exitStateAction, or memberWeight options is not valid for Group Replication.
Returns
nothing

This function adds an Instance to the default replica set of the cluster.

The instance definition is the connection data for the instance.

Only TCP/IP connections are allowed for this function.

The options dictionary may contain the following attributes:

  • label: an identifier for the instance being added
  • password: the instance connection password
  • memberSslMode: SSL mode used on the instance
  • ipWhitelist: The list of hosts allowed to connect to the instance for group replication
  • localAddress: string value with the Group Replication local address to be used instead of the automatically generated one.
  • groupSeeds: string value with a comma-separated list of the Group Replication peer addresses to be used instead of the automatically generated one.
  • exitStateAction: string value indicating the group replication exit state action.
  • memberWeight: integer value with a percentage weight for automatic primary election on failover. The password may be contained on the instance definition, however, it can be overwritten if it is specified on the options.
Attention
The memberSslMode option will be removed in a future release. The memberSslMode option supports the following values:
  • REQUIRED: if used, SSL (encryption) will be enabled for the instance to communicate with other members of the cluster
  • DISABLED: if used, SSL (encryption) will be disabled
  • AUTO: if used, SSL (encryption) will be automatically enabled or disabled based on the cluster configuration
If memberSslMode is not specified AUTO will be used by default. The exitStateAction option supports the following values:
  • ABORT_SERVER: if used, the instance shuts itself down if it leaves the cluster unintentionally.
  • READ_ONLY: if used, the instance switches itself to super-read-only mode if it leaves the cluster unintentionally.
If exitStateAction is not specified READ_ONLY will be used by default.

The ipWhitelist format is a comma separated list of IP addresses or subnet CIDR notation, for example: 192.168.1.0/24,10.0.0.1. By default the value is set to AUTOMATIC, allowing addresses from the instance private network to be automatically set for the whitelist.

The localAddress and groupSeeds are advanced options and their usage is discouraged since incorrect values can lead to Group Replication errors.

The value for localAddress is used to set the Group Replication system variable 'group_replication_local_address'. The localAddress option accepts values in the format: 'host:port' or 'host:' or ':port'. If the specified value does not include a colon (:) and it is numeric, then it is assumed to be the port, otherwise it is considered to be the host. When the host is not specified, the default value is the host of the target instance specified as argument. When the port is not specified, the default value is the port of the target instance * 10 + 1. In case the automatically determined default port value is invalid (> 65535) then a random value in the range [10000, 65535] is used.

The value for groupSeeds is used to set the Group Replication system variable 'group_replication_group_seeds'. The groupSeeds option accepts a comma-separated list of addresses in the format: 'host1:port1,...,hostN:portN'.

The value for exitStateAction is used to configure how Group Replication behaves when a server instance leaves the group unintentionally, for example after encountering an applier error. When set to ABORT_SERVER, the instance shuts itself down, and when set to READ_ONLY the server switches itself to super-read-only mode. The exitStateAction option accepts case-insensitive string values, being the accepted values: ABORT_SERVER (or 1) and READ_ONLY (or 0). The default value is READ_ONLY.

The value for memberWeight is used to set the Group Replication system variable 'group_replication_member_weight'. The memberWeight option accepts integer values. Group Replication limits the value range from 0 to 100, automatically adjusting it if a lower/bigger value is provided. Group Replication uses a default value of 50 if no value is provided.

◆ checkInstanceState()

Undefined checkInstanceState ( InstanceDef  instance)

Verifies the instance gtid state in relation to the cluster.

Parameters
instanceAn instance definition.

ArgumentError in the following scenarios:

  • If the 'instance' parameter is empty.
  • If the 'instance' parameter is invalid.
  • If the 'instance' definition is a connection dictionary but empty. RuntimeError in the following scenarios:
  • If the 'instance' is unreachable/offline.
  • If the 'instance' is a cluster member.
  • If the 'instance' belongs to a Group Replication group that is not managed as an InnoDB cluster.
  • If the 'instance' is a standalone instance but is part of a different InnoDB Cluster.
  • If the 'instance' has an unknown state.
Returns
resultset A JSON object with the status.

Analyzes the instance executed GTIDs with the executed/purged GTIDs on the cluster to determine if the instance is valid for the cluster.

The instance definition is the connection data for the instance.

Only TCP/IP connections are allowed for this function.

The returned JSON object contains the following attributes:

  • state: the state of the instance
  • reason: the reason for the state reported The state of the instance can be one of the following:
  • ok: if the instance transaction state is valid for the cluster
  • error: if the instance transaction state is not valid for the cluster The reason for the state reported can be one of the following:
  • new: if the instance doesn’t have any transactions
  • recoverable: if the instance executed GTIDs are not conflicting with the executed GTIDs of the cluster instances
  • diverged: if the instance executed GTIDs diverged with the executed GTIDs of the cluster instances
  • lost_transactions: if the instance has more executed GTIDs than the executed GTIDs of the cluster instances

◆ describe()

String describe ( )

Describe the structure of the cluster.

MetadataError in the following scenarios:

  • If the Metadata is inaccessible.
  • If the Metadata update operation failed.
Returns
A JSON object describing the structure of the cluster.

This function describes the structure of the cluster including all its information, ReplicaSets and Instances.

The returned JSON object contains the following attributes:

  • clusterName: the cluster name
  • defaultReplicaSet: the default ReplicaSet object

The defaultReplicaSet JSON object contains the following attributes:

  • name: the ReplicaSet name
  • topology: a list of dictionaries describing each instance belonging to the ReplicaSet.

Each instance dictionary contains the following attributes:

  • address: the instance address in the form of host:port
  • label: the instance name identifier
  • role: the instance role

◆ disconnect()

Undefined disconnect ( )

Disconnects all internal sessions used by the cluster object.

Returns
Nothing.

Disconnects the internal MySQL sessions used by the cluster to query for metadata and replication information.

◆ dissolve()

Undefined dissolve ( Dictionary  options)

Dissolves the cluster.

MetadataError in the following scenarios:

  • If the Metadata is inaccessible.
  • If the Metadata update operation failed.
Returns
Nothing.
Parameters
optionsOptional parameter to specify if it should deactivate replication and unregister the ReplicaSets from the cluster.

This function disables replication on the ReplicaSets, unregisters them and the the cluster from the metadata. It keeps all the user's data intact. The options dictionary may contain the following attributes:

  • force: boolean value used to confirm that the dissolve operation must be executed, even if some members of the cluster cannot be reached or the timeout was reached when waiting for members to catch up with replication changes. By default, set to false.
  • interactive: boolean value used to disable/enable the wizards in the command execution, i.e. prompts and confirmations will be provided or not according to the value set. The default value is equal to MySQL Shell wizard mode.

The force option (set to true) must only be used to dissolve a cluster with instances that are permanently not available (no longer reachable) or never to be reused again in a cluster. This allows to dissolve a cluster and remove it from the metadata, including instances than can no longer be recovered. Otherwise, the instances must be brought back ONLINE and the cluster dissolved without the force option to avoid errors trying to reuse the instances and add them back to a cluster.

◆ forceQuorumUsingPartitionOf()

Undefined forceQuorumUsingPartitionOf ( InstanceDef  instance,
String  password 
)

Restores the cluster from quorum loss.

Parameters
instanceAn instance definition to derive the forced group from.
passwordOptional string with the password for the connection.

ArgumentError in the following scenarios:

  • If the instance parameter is empty.
  • If the instance definition cannot be used for Group Replication. RuntimeError in the following scenarios:
  • If the instance does not exist on the Metadata.
  • If the instance is not on the ONLINE state.
  • If the instance does is not an active member of a replication group.
  • If there are no ONLINE instances visible from the given one. LogicError in the following scenarios:
  • If the cluster does not exist.
Returns
Nothing.

This function restores the cluster's default replicaset back into operational status from a loss of quorum scenario. Such a scenario can occur if a group is partitioned or more crashes than tolerable occur.

The instance definition is the connection data for the instance.

Only TCP/IP connections are allowed for this function.

The options dictionary may contain the following options:

  • mycnfPath: The path of the MySQL configuration file for the instance.
  • password: The password to get connected to the instance.
  • clusterAdmin: The name of the InnoDB cluster administrator user.
  • clusterAdminPassword: The password for the InnoDB cluster administrator account.

The password may be contained on the instance definition, however, it can be overwritten if it is specified on the options.

Note that this operation is DANGEROUS as it can create a split-brain if incorrectly used and should be considered a last resort. Make absolutely sure that there are no partitions of this group that are still operating somewhere in the network, but not accessible from your location.

When this function is used, all the members that are ONLINE from the point of view of the given instance definition will be added to the group.

◆ getName()

String getName ( )

Retrieves the name of the cluster.

Returns
The name of the cluster.

◆ rejoinInstance()

Undefined rejoinInstance ( InstanceDef  instance,
Dictionary  options 
)

Rejoins an Instance to the cluster.

Parameters
instanceAn instance definition.
optionsOptional dictionary with options for the operation.

MetadataError in the following scenarios:

  • If the Metadata is inaccessible.
  • If the Metadata update operation failed. ArgumentError in the following scenarios:
  • If the value for the memberSslMode option is not one of the allowed: "AUTO", "DISABLED", "REQUIRED".
  • If the instance definition cannot be used for Group Replication. RuntimeError in the following scenarios:
  • If the instance does not exist.
  • If the instance accounts are invalid.
  • If the instance is not in bootstrapped state.
  • If the SSL mode specified is not compatible with the one used in the cluster.
  • If the instance is an active member of the ReplicaSet.
Returns
Nothing.

This function rejoins an Instance to the cluster.

The instance definition is the connection data for the instance.

Only TCP/IP connections are allowed for this function.

The options dictionary may contain the following attributes:

  • label: an identifier for the instance being added
  • password: the instance connection password
  • memberSslMode: SSL mode used on the instance
  • ipWhitelist: The list of hosts allowed to connect to the instance for group replication

The password may be contained on the instance definition, however, it can be overwritten if it is specified on the options.

Attention
The memberSslMode option will be removed in a future release.

The memberSslMode option supports these values:

  • REQUIRED: if used, SSL (encryption) will be enabled for the instance to communicate with other members of the cluster
  • DISABLED: if used, SSL (encryption) will be disabled
  • AUTO: if used, SSL (encryption) will be automatically enabled or disabled based on the cluster configuration If memberSslMode is not specified AUTO will be used by default.

The ipWhitelist format is a comma separated list of IP addresses or subnet CIDR notation, for example: 192.168.1.0/24,10.0.0.1. By default the value is set to AUTOMATIC, allowing addresses from the instance private network to be automatically set for the whitelist.

◆ removeInstance()

Undefined removeInstance ( InstanceDef  instance,
Dictionary  options 
)

Removes an Instance from the cluster.

Parameters
instanceAn instance definition.
optionsOptional dictionary with options for the operation.

MetadataError in the following scenarios:

  • If the Metadata is inaccessible.
  • If the Metadata update operation failed. ArgumentError in the following scenarios:
  • If the instance parameter is empty.
  • If the instance definition is invalid.
  • If the instance definition is a connection dictionary but empty.
  • If the instance definition cannot be used for Group Replication. RuntimeError in the following scenarios:
  • If the instance accounts are invalid.
  • If an error occurs when trying to remove the instance (e.g., instance is not reachable).
Returns
Nothing.

This function removes an Instance from the default replicaSet of the cluster.

The instance definition is the connection data for the instance.

Only TCP/IP connections are allowed for this function.

The options dictionary may contain the following attributes:

  • password: the instance connection password
  • force: boolean, indicating if the instance must be removed (even if only from metadata) in case it cannot be reached. By default, set to false.
  • interactive: boolean value used to disable/enable the wizards in the command execution, i.e. prompts and confirmations will be provided or not according to the value set. The default value is equal to MySQL Shell wizard mode.

The password may be contained in the instance definition, however, it can be overwritten if it is specified on the options.

The force option (set to true) must only be used to remove instances that are permanently not available (no longer reachable) or never to be reused again in a cluster. This allows to remove from the metadata an instance than can no longer be recovered. Otherwise, the instance must be brought back ONLINE and removed without the force option to avoid errors trying to add it back to a cluster.

◆ rescan()

Undefined rescan ( Dictionary  options)

Rescans the cluster.

ArgumentError in the following scenarios:

  • If the value for `addInstances` or `removeInstance` is empty.
  • If the value for `addInstances` or `removeInstance` is invalid. MetadataError in the following scenarios:
  • If the Metadata is inaccessible.
  • If the Metadata update operation failed. LogicError in the following scenarios:
  • If the cluster does not exist. RuntimeError in the following scenarios:
  • If all the ReplicaSet instances of any ReplicaSet are offline.
  • If an instance specified for `addInstances` is not an active member of the replication group.
  • If an instance specified for `removeInstances` is an active member of the replication group.
Parameters
optionsOptional Dictionary with options for the operation.
Returns
Nothing.

This function rescans the cluster for new and obsolete Group Replication members/instances, as well as changes in the used topology mode (i.e., single-primary and multi-primary).

The options dictionary may contain the following attributes:

  • addInstances: List with the connection data of the new active instances to add to the metadata, or "auto" to automatically add missing instances to the metadata.
  • interactive: boolean value used to disable/enable the wizards in the command execution, i.e. prompts and confirmations will be provided or not according to the value set. The default value is equal to MySQL Shell wizard mode.
  • removeInstances: List with the connection data of the obsolete instances to remove from the metadata, or "auto" to automatically remove obsolete instances from the metadata.
  • updateTopologyMode: boolean value used to indicate if the topology mode (single-primary or multi-primary) in the metadata should be updated (true) or not (false) to match the one being used by the cluster. By default, the metadata is not updated (false).

The value for addInstances and removeInstances is used to specify which instances to add or remove from the metadata, respectively. Both options accept list connection data. In addition, the "auto" value can be used for both options in order to automatically add or remove the instances in the metadata, without having to explicitly specify them.

◆ status()

String status ( Dictionary  options)

Describe the status of the cluster.

Parameters
optionsOptional dictionary with options.

MetadataError in the following scenarios:

  • If the Metadata is inaccessible.
  • If the Metadata update operation failed.
Returns
A JSON object describing the status of the cluster.

This function describes the status of the cluster including its ReplicaSets and Instances. The following options may be given to control the amount of information gathered and returned.

  • extended: if true, includes information about transactions processed by connection and applier, as well as groupName and memberId values.
  • queryMembers: if true, connect to each Instance of the ReplicaSets to query for more detailed stats about the replication machinery.

◆ switchToSinglePrimaryMode()

Undefined switchToSinglePrimaryMode ( InstanceDef  instance)

Switches the cluster to single-primary mode.

ArgumentError in the following scenarios:

  • If the instance parameter is empty.
  • If the instance definition is invalid. RuntimeError in the following scenarios:
  • If 'instance' does not refer to a cluster member.
  • If any of the cluster members has a version < 8.0.13.
  • If the cluster has no visible quorum.
  • If any of the cluster members is not ONLINE.
Returns
Nothing.
Parameters
instanceOptional An instance definition.

This function changes a cluster running in multi-primary mode to single-primary mode. The instance definition is the connection data for the instance.

Only TCP/IP connections are allowed for this function.

The instance definition is optional and is the identifier of the cluster member that shall become the new primary. If the instance definition is not provided, the new primary will be the instance with the highest member weight (and the lowest UUID in case of a tie on member weight).

◆ switchToMultiPrimaryMode()

Undefined switchToMultiPrimaryMode ( )

Switches the cluster to multi-primary mode.

RuntimeError in the following scenarios:

  • If any of the cluster members has a version < 8.0.13.
  • If the cluster has no visible quorum.
  • If any of the cluster members is not ONLINE.
Returns
Nothing.

This function changes a cluster running in single-primary mode to multi-primary mode.

◆ setPrimaryInstance()

Undefined setPrimaryInstance ( InstanceDef  instance)

Switches the cluster to single-primary mode.

ArgumentError in the following scenarios:

  • If the instance parameter is empty.
  • If the instance definition is invalid. RuntimeError in the following scenarios:
  • If 'instance' does not refer to a cluster member.
  • If any of the cluster members has a version < 8.0.13.
  • If the cluster has no visible quorum.
  • If any of the cluster members is not ONLINE.
Returns
Nothing.
Parameters
instanceOptional An instance definition.

This function changes a cluster running in multi-primary mode to single-primary mode. The instance definition is the connection data for the instance.

Only TCP/IP connections are allowed for this function.

The instance definition is optional and is the identifier of the cluster member that shall become the new primary.

◆ options()

String options ( Dictionary  options)

Lists the cluster configuration options.

Parameters
optionsOptional Dictionary with options.

MetadataError in the following scenarios:

  • If the Metadata is inaccessible.
Returns
A JSON object describing the configuration options of the cluster.

This function lists the cluster configuration options for itsReplicaSets and Instances. The following options may be given to controlthe amount of information gathered and returned.

  • all: if true, includes information about all group_replication system variables.

◆ setOption()

Undefined setOption ( String  option,
String  value 
)

Changes the value of a configuration option for the whole cluster.

ArgumentError in the following scenarios:

  • If the 'option' parameter is empty.
  • If the 'value' parameter is empty.
  • If the 'option' parameter is invalid. RuntimeError in the following scenarios:
  • If any of the cluster members do not support the configuration option passed in 'option'.
  • If the value passed in 'option' is not valid for Group Replication.
  • If the cluster has no visible quorum.
  • If any of the cluster members is not ONLINE.
Returns
Nothing.
Parameters
optionThe configuration option to be changed.
valueThe value that the configuration option shall get.

This function changes an InnoDB Cluster configuration option in all members of the cluster. The 'option' parameter is the name of the configuration option to be changed. The value parameter is the value that the configuration option shall get. The accepted values for the configuration option are:

  • clusterName: string value to define the cluster name.
  • exitStateAction: string value indicating the group replication exit state action.
  • memberWeight: integer value with a percentage weight for automatic primary election on failover. ${CLUSTER_OPT_MEMBER_WEIGHT} ${CLUSTER_OPT_FAILOVER_CONSISTENCY} ${CLUSTER_OPT_EXPEL_TIMEOUT} The exitStateAction option supports the following values: The failoverConsistency option supports the following values: The value for exitStateAction is used to configure how Group Replication behaves when a server instance leaves the group unintentionally, for example after encountering an applier error. When set to ABORT_SERVER, the instance shuts itself down, and when set to READ_ONLY the server switches itself to super-read-only mode. The exitStateAction option accepts case-insensitive string values, being the accepted values: ABORT_SERVER (or 1) and READ_ONLY (or 0). The default value is READ_ONLY. The value for memberWeight is used to set the Group Replication system variable 'group_replication_member_weight'. The memberWeight option accepts integer values. Group Replication limits the value range from 0 to 100, automatically adjusting it if a lower/bigger value is provided. Group Replication uses a default value of 50 if no value is provided. The value for failoverConsistency is used to set the Group Replication system variable 'group_replication_failover_consistency' and configure how Group Replication behaves when a new primary instance is elected. When set to BEFORE_ON_PRIMARY_FAILOVER, new queries (read or write) to the newly elected primary that is applying backlog from the old primary, will be hold be hold before execution until the backlog is applied. When set to EVENTUAL, read queries to the new primary are allowed even if the backlog isn't applied but writes will fail (if the backlog isn't applied) due to super-read-only mode being enabled. The client may return old valued. The failoverConsistency option accepts case-insensitive string values, being the accepted values: BEFORE_ON_PRIMARY_FAILOVER (or 1) and EVENTUAL (or 0). The default value is EVENTUAL. The value for expelTimeout is used to set the Group Replication system variable 'group_replication_member_expel_timeout' and configure how long Group Replication will wait before expelling from the group any members suspected of having failed. On slow networks, or when there are expected machine slowdowns, increase the value of this option. The expelTimeout option accepts positive integer values in the range [0, 3600]. The default value is 0.

◆ setInstanceOption()

Undefined setInstanceOption ( InstanceDef  instance,
String  option,
String  value 
)

Changes the value of a configuration option in a Cluster member.

ArgumentError in the following scenarios:

  • If the 'instance' parameter is empty.
  • If the 'instance' parameter is invalid.
  • If the 'instance' definition is a connection dictionary but empty.
  • If the 'option' parameter is empty.
  • If the 'value' parameter is empty.
  • If the 'option' parameter is invalid. RuntimeError in the following scenarios:
  • If 'instance' does not refer to a cluster member.
  • If the cluster has no visible quorum.
  • If 'instance' is not ONLINE.
  • If 'instance' does not support the configuration option passed in 'option'.
  • If the value passed in 'option' is not valid for Group Replication.
Returns
Nothing.
Parameters
instanceAn instance definition.
optionThe configuration option to be changed.
valueThe value that the configuration option shall get.

This function changes an InnoDB Cluster configuration option in a member of the cluster. The instance definition is the connection data for the instance.

Only TCP/IP connections are allowed for this function.

The option parameter is the name of the configuration option to be changed The value parameter is the value that the configuration option shall get. The accepted values for the configuration option are:

  • exitStateAction: string value indicating the group replication exit state action.
  • memberWeight: integer value with a percentage weight for automatic primary election on failover.
  • label a string identifier of the instance. The exitStateAction option supports the following values: The value for exitStateAction is used to configure how Group Replication behaves when a server instance leaves the group unintentionally, for example after encountering an applier error. When set to ABORT_SERVER, the instance shuts itself down, and when set to READ_ONLY the server switches itself to super-read-only mode. The exitStateAction option accepts case-insensitive string values, being the accepted values: ABORT_SERVER (or 1) and READ_ONLY (or 0). The default value is READ_ONLY. The value for memberWeight is used to set the Group Replication system variable 'group_replication_member_weight'. The memberWeight option accepts integer values. Group Replication limits the value range from 0 to 100, automatically adjusting it if a lower/bigger value is provided. Group Replication uses a default value of 50 if no value is provided.

◆ sync_transactions()

void sync_transactions ( const mysqlshdk::mysql::IInstance &  target_instance) const

Synchronize transactions on target instance.

Wait for all current cluster transactions to be applied on the specified target instance.

Parameters
target_instanceinstance to wait for transaction to be applied.
Exceptions
RuntimeErrorif the timeout is reached when waiting for transactions to be applied.