Module cartridge.topology

Topology validation and filtering.

Functions

cluster_is_healthy () Check the cluster health.

Local Functions

get_leaders_orded (topology_cfg, replicaset_uuid, new_order) Get full list of replicaset leaders.
validate (topology_new, topology_old) Validate topology configuration.
find_server_by_uri (topology_cfg, uri) Find the server in topology config.
probe_missing_members (servers) Send UDP ping to servers missing from membership table.
get_fullmesh_replication (topology_cfg, replicaset_uuid) Get replication config to set up full mesh.


Functions

cluster_is_healthy ()
Check the cluster health. It is healthy if all instances are healthy.

The function is designed mostly for testing purposes.

Returns:

    boolean true / false

Local Functions

get_leaders_orded (topology_cfg, replicaset_uuid, new_order)
Get full list of replicaset leaders.

Full list is composed of:

  1. New order array
  2. Initial order from topology_cfg (with no repetitions)
  3. All other servers in the replicaset, sorted by uuid, ascending

Neither topology_cfg nor new_order tables are modified. New order validity is ignored too.

Parameters:

Returns:

    {string,...} array of leaders uuids
validate (topology_new, topology_old)
Validate topology configuration.

Parameters:

Returns:

    boolean true

Or

  1. nil
  2. table Error description
find_server_by_uri (topology_cfg, uri)
Find the server in topology config.

(Added in v1.2.0-17)

Parameters:

Returns:

    nil or string instance_uuid found
probe_missing_members (servers)
Send UDP ping to servers missing from membership table.

Parameters:

Returns:

    boolean true

Or

  1. nil
  2. table Error description
get_fullmesh_replication (topology_cfg, replicaset_uuid)
Get replication config to set up full mesh.

(Added in v1.2.0-17)

Parameters:

Returns:

    table
generated by LDoc 1.4.6 Last updated 2020-01-15 15:54:21