• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 12078228676
88%

Build:
DEFAULT BRANCH: master
Ran 29 Nov 2024 03:11AM UTC
Jobs 1
Files 518
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Nov 2024 02:56AM UTC coverage: 87.326% (-0.006%) from 87.332%
12078228676

push

github

Totktonada
config: allow to automatically expel instances

Fixes #10823

@TarantoolBot document
Title: `replication.autoexpel` configuration option

Dev issue: https://github.com/tarantool/tarantool/10823

The new option is useful for management of dynamic clusters using the
YAML configuration. The option allows to automatically expel instances
that are removed from the YAML configuration.

A ready-to-run example:

```yaml
credentials:
  users:
    guest:
      roles: [super]

replication:
  failover: manual
  autoexpel:
    enabled: true
    by: prefix
    prefix: '{{ replicaset_name }}'

iproto:
  listen:
    - uri: 'unix/:./var/run/{{ instance_name }}.iproto'

groups:
  g-001:
    replicasets:
      r-001:
        leader: r-001-i-001
        instances:
          r-001-i-001: {}
          r-001-i-002: {}
          r-001-i-003: {}
```

How to run the example:

1. Start all the three instances:

   ```shell
   $ tarantool --name r-001-i-001 --config config.yaml -i
   $ tarantool --name r-001-i-002 --config config.yaml -i
   $ tarantool --name r-001-i-003 --config config.yaml -i
   ```

2. Remove `r-001-i-003` from `config.yaml`.

3. Reload the configuration on `r-001-i-001` (leader) and check the
   effect:

   ```lua
   tarantool> box.space._cluster:fselect()
   <..r-001-i-003 is here..>

   tarantool> config = require('config')
   tarantool> config:reload()

   tarantool> box.space._cluster:fselect()
   <..r-001-i-003 is deleted..>
   ```

Only instances whose names start from the given prefix are taken
into account, all the others are ignored. Also, instances without a
persistent name set are ignored too.

If an instance is in read-write mode and has a latest database schema,
it performs expelling of the instances:

* with the given prefix, *and*
* not present in the YAML configuration.

The expelling process the usual one: deletion from the `_cluster` system
space.

The autoexpel logic works on startup and reacts on the reconfiguration
and the `box.status` w... (continued)

69509 of 123342 branches covered (56.35%)

102422 of 117287 relevant lines covered (87.33%)

2715450.38 hits per line

Jobs
ID Job ID Ran Files Coverage
1 12078228676.1 29 Nov 2024 03:11AM UTC 0
87.33
GitHub Action Run
Source Files on build 12078228676
Detailed source file information is not available for this build.
  • Back to Repo
  • b2c11535 on github
  • Prev Build on master (#12077912174)
  • Next Build on master (#12082606827)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc