Module cartridge.topology | Tarantool
Tarantool Cartridge Table of contents Module cartridge.topology

Module cartridge.topology

Topology validation and filtering.

Check the instance health. It is healthy if its state is OK.

The function is designed mostly for testing purposes.

Returns:

(boolean) true

Or

(nil)

(table) Error description

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

The function is designed mostly for testing purposes.

Returns:

(boolean) true

Or

(nil)

(table) Error description

Get full list of replicaset leaders.

Full list is composed of:

  • New order array
  • Initial order from topology_cfg (with no repetitions)
  • 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.

By default, get_leaders_order doesn’t return unelectable nodes. To fix it, use only_electable argument of opts .

By default, get_leaders_order returns disabled nodes. To fix it, use only_enabled argument of opts .

Parameters:

Returns:

({string,…}) array of leaders uuids

Validate topology configuration.

Parameters:

Returns:

(boolean) true

Or

(nil)

(table) Error description

Find the server in topology config.

(Added in v1.2.0-17)

Parameters:

Returns:

(nil or string) instance_uuid found

Merge servers URIs form topology_cfg with fresh membership status.

This function sustains cartridge operability in case of advertise_uri change. The uri map is composed basing on topology_cfg, but if some of them turns out to be dead, the member with corresponding payload.uuid is searched beyond.

(Added in v2.3.0-7)

Parameters:

Returns:

({[uuid]) = uri} with all servers except expelled ones.

Send UDP ping to servers missing from membership table.

Parameters:

Returns:

(boolean) true

Or

(nil)

(table) Error description

Get replication config to set up full mesh.

(Added in v1.2.0-17)

Parameters:

Returns:

(table)

Found what you were looking for?
Feedback