Skip to content

Commit d118e0c

Browse files
committed
3.0 config: replication administration - update per review 2
1 parent c654c92 commit d118e0c

File tree

5 files changed

+17
-22
lines changed

5 files changed

+17
-22
lines changed

doc/book/admin/disaster_recovery.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Master crash: manual failover
3737

3838
5. On a new master, :ref:`remove a crashed instance from the '_cluster' space <replication-remove_instances-remove_cluster>`.
3939

40-
6. Start the instance again on a spare host.
40+
6. Set up a replacement for the crashed master on a spare host.
4141

4242
See also: :ref:`Performing manual failover <replication-controlled_failover>`.
4343

@@ -55,10 +55,9 @@ Master crash: automated failover
5555

5656
1. Use ``box.info.election`` to make sure a new master is elected automatically.
5757

58-
2. Remove a crashed master from a replica set.
58+
2. On a new master, :ref:`remove a crashed instance from the '_cluster' space <replication-remove_instances-remove_cluster>`.
5959

6060
3. Set up a replacement for the crashed master on a spare host.
61-
Learn more from :ref:`Adding and removing instances <replication-automated-failover-add-remove-instances>`.
6261

6362
See also: :ref:`Testing automated failover <replication-automated-failover-testing>`.
6463

doc/book/admin/replication/repl_monitoring.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,3 @@ The primary indicators of replication health are:
5252
Since the ``lag`` calculation uses the operating system clocks from two different
5353
machines, do not be surprised if it’s negative: a time drift may lead to the
5454
remote master clock being consistently behind the local instance's clock.
55-
56-
For a :ref:`master-master <replication-bootstrap-master-master>` configuration, ``lag`` is the maximal lag.

doc/book/admin/replication/repl_problem_solving.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This topic describes how to solve problems in :ref:`master-master <replication-b
1414
Replacing the same primary key
1515
------------------------------
1616

17-
You have two instances of Tarantool. For example, you try to make a
17+
**Case 1:** You have two instances of Tarantool. For example, you try to make a
1818
``replace`` operation with the same primary key on both instances at the same time.
1919
This causes a conflict over which tuple to save and which one to discard.
2020

@@ -68,8 +68,7 @@ Preventing duplicate insert
6868

6969
.. _replication-replication_stops:
7070

71-
In a replica set of two masters, suppose master #1 tries to
72-
``insert`` a tuple with the same unique key:
71+
**Case 2:** In a replica set of two masters, both of them try to insert data by the same unique key:
7372

7473
.. code-block:: tarantoolsession
7574
@@ -154,8 +153,8 @@ To learn how to resolve a replication conflict by reseeding a replica, see :ref:
154153

155154
.. _replication-runs_out_of_sync:
156155

157-
Solution 1: replication runs out of sync
158-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156+
Replication runs out of sync
157+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
159158

160159
In a master-master cluster of two instances, suppose we make the following
161160
operation:
@@ -181,8 +180,8 @@ When this operation is applied on both instances in the replica set:
181180

182181
.. _replication-commutative_changes:
183182

184-
Solution 2: commutative changes
185-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183+
Commutative changes
184+
~~~~~~~~~~~~~~~~~~~
186185

187186
The cases described in the previous paragraphs represent examples of
188187
**non-commutative** operations, that is operations whose result depends on the
@@ -200,11 +199,12 @@ the update is applied on the other masters.
200199

201200
.. _replication_trigger_usage:
202201

203-
Solution 3: trigger usage
204-
~~~~~~~~~~~~~~~~~~~~~~~~~
202+
Trigger usage
203+
~~~~~~~~~~~~~
205204

206-
The logic and the snippet setting a trigger will be the same here as in case 1.
207-
But the trigger function will differ:
205+
The logic and the snippet setting a trigger will be the same here as in :ref:`case 1 <replication-problem_solving_replacing_primary_key>`.
206+
But the trigger function will differ.
207+
Note that the trigger below assumes that tuple has a timestamp in the second field.
208208

209209
.. code-block:: lua
210210

doc/book/admin/replication/repl_recover.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ hardware or network failure, or due to a programming bug.
4141
4242
4343
44-
The master's status is reported as ``disconnected`` when executing :ref:`box.info.replication <replication-monitoring>` on a replica:
44+
The master's upstream status is reported as ``disconnected`` when executing :ref:`box.info.replication <replication-monitoring>` on a replica:
4545

4646
.. include:: /how-to/replication/repl_bootstrap_auto.rst
4747
:start-after: box_info_replication_auto_leader_disconnected_start

doc/book/admin/troubleshoot.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,10 @@ error message like
249249

250250
**Solution**
251251

252-
Restart replication at each master instance.
253-
Connect to each master instance using the :ref:`tt connect <tt-connect>` command:
252+
This issue can be fixed in two ways:
254253

255-
.. code-block:: console
256-
257-
$ tt connect <instance_name|URI>
254+
- Manually: :ref:`reseed <replication-master-master-reseed-replica>` one master from another by removing write-ahead logs and snapshots.
255+
- Programmatically: set up a :ref:`conflict resolution trigger <replication-problem_solving>`.
258256

259257
Then, restart replication as described in :ref:`Restarting replication <replication-master-master-resolve-conflict>`.
260258

0 commit comments

Comments
 (0)