Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 40 additions & 38 deletions doc/reference/reference_rock/vshard/vshard_ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Basic parameters
* :ref:`rebalancer_max_receiving <cfg_basic-rebalancer_max_receiving>`
* :ref:`rebalancer_max_sending <cfg_basic-rebalancer_max_sending>`
* :ref:`discovery_mode <cfg_basic-discovery_mode>`
* :ref:`master <cfg_basic-master>`

.. _cfg_basic-sharding:

Expand Down Expand Up @@ -175,14 +174,46 @@ Basic parameters
| Default: 'on'
| Dynamic: yes

.. _cfg_basic-master:
.. _vshard-config-replica-set-funcs:

-------------------------------------------------------------------------------
Replica set parameters
-------------------------------------------------------------------------------

* :ref:`uuid <cfg_replica_set-uuid>`
* :ref:`weight <cfg_replica_set-weight>`
* :ref:`master <cfg_replica_set-master>`

.. _cfg_replica_set-uuid:

.. confval:: uuid

A unique identifier of a replica set.

| Type:
| Default:
| Dynamic:

.. _cfg_replica_set-weight:

.. confval:: weight

A weight of a replica set. See the :ref:`Replica set weights <vshard-replica-set-weights>`
section for details.

| Type:
| Default: 1
| Dynamic:

.. _cfg_replica_set-master:

.. confval:: master

Turns on automated master discovery in a replica set if set to ``auto``.
Applicable only to the configuration of a router; the storage configuration ignores this parameter.

The parameter should be specified per replica set and is not compatible with manual master selection.
The parameter should be specified per replica set.
The configuration is not compatible with a manual master selection.

**Examples**

Expand Down Expand Up @@ -227,48 +258,19 @@ Basic parameters
...
}

If configuration is incorrect configuration, it is not applied, and the ``vshard.router.cfg()`` call throws an error.

If the configuration is incorrect, it is not applied, and the ``vshard.router.cfg()`` call throws an error.

If the ``master`` parameter is set to ``auto`` for some replica sets, the router goes to these replica sets, discovers the master in each of them, and periodically checks if the master instance still has its master status.
When the master in the replica set stops being a master, the router goes around all the nodes of the replica set and finds out which one is the new master.
If the ``master`` parameter is set to ``auto`` for some replica sets, the router goes to these replica sets,
discovers the master in each of them, and periodically checks if the master instance still has its master status.
When the master in the replica set stops being a master, the router goes around all the nodes of the replica set
to find out which one is the new master.

Without this setting, the router cannot detect master nodes in the configured replica sets on its own.
It relies only on how they are specified in the configuration.
This becomes a problem when the master changes and the change is not delivered to the router's configuration:
This becomes a problem when the master changes, and the change is not delivered to the router's configuration:
for instance, in case the router doesn't rely on a central configuration provider
or the provider cannot deliver a new configuration due to some reason.

| Type: string
| Default: ``nil``
| Dynamic: yes

.. _vshard-config-replica-set-funcs:

-------------------------------------------------------------------------------
Replica set parameters
-------------------------------------------------------------------------------

* :ref:`uuid <cfg_replica_set-uuid>`
* :ref:`weight <cfg_replica_set-weight>`

.. _cfg_replica_set-uuid:

.. confval:: uuid

A unique identifier of a replica set.

| Type:
| Default:
| Dynamic:

.. _cfg_replica_set-weight:

.. confval:: weight

A weight of a replica set. See the :ref:`Replica set weights <vshard-replica-set-weights>`
section for details.

| Type:
| Default: 1
| Dynamic:
4 changes: 2 additions & 2 deletions doc/reference/reference_rock/vshard/vshard_router.rst
Original file line number Diff line number Diff line change
Expand Up @@ -941,14 +941,14 @@ Router public API

.. function:: vshard.router.master_search_wakeup()

:ref:`Automated master discovery <cfg_basic-master>` works in its own fiber on a router,
:ref:`Automated master discovery <cfg_replica_set-master>` works in its own fiber on a router,
which is activated only if at least one replica set is configured to look for the master (the ``master`` parameter is set to ``auto``).
The fiber wakes up within a certain period. But it is possible to wake it up on demand by using this function.

Manual fiber wakeup can help speed up tests for master change.
Another use case is performing some actions with a router in the router console.

The function does nothing if master search is not :ref:`configured <cfg_basic-master>` for any replica set.
The function does nothing if master search is not :ref:`configured <cfg_replica_set-master>` for any replica set.

:return: none

Expand Down