Skip to content

vshard: master discovery on storage level #3864

Open
@TarantoolBot

Description

@TarantoolBot

Related dev. issue(s): tarantool/vshard#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 tarantool/vshard@eeccaff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.0configvshard[area] Related to vshard module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions