tarantool / tarantool/doc

vshard: master discovery on storage level

Open
#3,864 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.0 config vshard
Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Related dev. issue(s): https://github.com/tarantool/vshard/issues/430

Product: Tarantool/vshard
Since: 0.1.25 ?
Root document: https://www.tarantool.io/en/doc/latest/book/admin/vshard_admin/#configuration
SME: @ Gerold103

Details

Routers do already support master = 'auto' setting at the
replicaset level in the config. It makes them able to
automatically find the master instance location in the so
configured replicaset.

On the storages it wasn't supported at all. But now it is. The
storages can specify in their configs the same option
master = 'auto' for their own replicaset and for any other
replicasets too.

If the storage has master = 'auto' for its own replicaset, then
it will constantly monitor box.info.ro. When it becomes true,
the instance considers itself a replica. When false - considers
itself a master. It also means that such automatic masters will
start and stop all needed background fibers automatically as well,
depending on the actual state of the instance, not on the config.

However it is worth keeping in mind that this option doesn't mean
master election. It only means master detection. I.e. if this
option is used, then the user's code is supposed to assign the
masters using box.cfg.read_only or any other way.

If the storage sees master = 'auto' for any other replicasets
than its own, then it will be able to automatically discover their
master instance for internal operations, such as bucket recovery
and rebalancing.
Requested by @ Gerold103 in https://github.com/tarantool/vshard/commit/eeccaff7e9d5e68195a85665a6f70b383cc45ef3.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the vshard configuration section in the linked root document and compare its existing coverage of router-level master = 'auto'. Document storage-level use for the local and other replicasets, including detection rather than election and the automatic background-fiber behavior; done means the configuration and limitations are clear.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.