3.0 config: update replication tutorials#3862
Conversation
6994648 to
d230e43
Compare
7153397 to
2355b9c
Compare
e15a38f to
2b08f1d
Compare
2c8e3b6 to
8aedebc
Compare
Totktonada
left a comment
There was a problem hiding this comment.
I saw several drafts of this patchset and it was generally OK for me. I'm going to approve without looking over one more time.
I would only note that it is easy to become entangled with all these replication reconfiguration steps. I would illustrate them with some pictures, if possible (of course, it is not a blocker for this pull request).
p7nov
left a comment
There was a problem hiding this comment.
I've checked:
They're fine by me, just some minor improvement thoughts.
| replication source(s), and | ||
| * :ref:`read_only <cfg_basic-read_only>` which is ``true`` for a | ||
| replica and ``false`` for a master. | ||
| Prerequisites |
There was a problem hiding this comment.
I feel a lack of some general description of what we'll do. Something like "We'll start a cluster with a manual failover, check how the replication works, and switch master manually."
There was a problem hiding this comment.
Totally forgot about intros, added.
| Reloading configuration | ||
| ~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| After adding ``instance003`` to the configuration and starting it, configurations on all instances should be reloaded to allow ``instance001`` and ``instance002`` to get data from the new instance in case it becomes a master: |
There was a problem hiding this comment.
This is exactly the case where passive voice confuses readers :)
I couldn't understand by whom the configuration should be reloaded until I read the step 2 below.
There was a problem hiding this comment.
Thanks, will fix :)
| Removing an instance from the configuration | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| 1. Remove ``instance003`` from the ``instances.yml`` file: |
There was a problem hiding this comment.
Minor: it would be natural to remove instance001, since we've already took leadership from it.
|
|
||
| .. _replication-automated-failover-tt-env: | ||
|
|
||
| Prerequisites |
| ... | ||
|
|
||
| 4. Execute ``box.info.replication`` to check a replica set status. | ||
| Make sure that ``upstream.status`` and ``downstream.status`` are ``follow`` for ``instance002`` and ``instance003``. |
There was a problem hiding this comment.
| Make sure that ``upstream.status`` and ``downstream.status`` are ``follow`` for ``instance002`` and ``instance003``. | |
| Make sure that ``upstream.status`` and ``downstream.status`` are ``follow`` for ``instance001`` and ``instance003``. |
| Adding data | ||
| ~~~~~~~~~~~ | ||
|
|
||
| To check that replicas (``instance001`` and ``instance003``) get all updates from the master(``instance002``), follow the steps below: |
There was a problem hiding this comment.
| To check that replicas (``instance001`` and ``instance003``) get all updates from the master(``instance002``), follow the steps below: | |
| To check that replicas (``instance001`` and ``instance003``) get all updates from the master (``instance002``), follow the steps below: |
|
|
||
| 3. Use the ``select`` operation on ``instance001`` and ``instance003`` to make sure data is replicated. | ||
|
|
||
| 4. Check that the 1-st component of :ref:`box.info.vclock <box_introspection-box_info>` values are the same on all instances: |
There was a problem hiding this comment.
1-st looks a bit weird.
I get that it's not the first but corresponding to key 1. Maybe call it "1 component" ("1" digit in code style)?
There was a problem hiding this comment.
Agree, took this from the old changelog. Will fix.
| Choosing a leader manually | ||
| -------------------------- | ||
|
|
||
| 1. Make sure that :ref:`box.info.vclock <box_introspection-box_info>` values (excluding the 0-th components) are the same on all instances: |
b189d5f to
9af33f9
Compare
| Leader election doesn't work correctly if the election quorum is set to less or equal | ||
| than ``<cluster size> / 2`` because in that case, a split vote can lead to | ||
| a state when two leaders are elected at once. |
There was a problem hiding this comment.
| Leader election doesn't work correctly if the election quorum is set to less or equal | |
| than ``<cluster size> / 2`` because in that case, a split vote can lead to | |
| a state when two leaders are elected at once. | |
| Leader election doesn't work correctly if the election quorum is set to less or equal | |
| than ``<cluster size> / 2``. In that case, a split vote can lead to | |
| a state when two leaders are elected at once. |
| Step 1: Configuring a failover mode | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| First, set the :ref:`replication.failover <configuration_reference_replication_failover>` option to ``manual``: |
There was a problem hiding this comment.
| First, set the :ref:`replication.failover <configuration_reference_replication_failover>` option to ``manual``: | |
| Set the :ref:`replication.failover <configuration_reference_replication_failover>` option to ``manual``: |
| ... | ||
|
|
||
| 3. Execute ``box.info.replication`` to check a replica set status. | ||
| For ``instance002``, ``upstream.status`` and ``downstream.status`` should be ``follow``. |
There was a problem hiding this comment.
| For ``instance002``, ``upstream.status`` and ``downstream.status`` should be ``follow``. | |
| For ``instance001``, ``upstream.status`` and ``downstream.status`` should be ``follow``. |
b195ffe to
1a0aa6f
Compare


Created 3 new tutorials for each failover mode:
The
Configuring synchronous replicationsection is removed as it demonstrates not the best practices. Information about enabling sync replication added in the main topic and API docs:Managing leader electionsis moved toConceptsas it doesn't fit into theTutorialssection:Added information about a new
box.info.election.leaderfield:Mentioned new tutorials in configuration reference for the
replication.failoveroption: