You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/how-to/replication/repl_bootstrap.rst
+4
Original file line number
Diff line number
Diff line change
@@ -232,10 +232,14 @@ To check that a replica (``instance002``) gets all updates from the master, foll
232
232
- {1: 21}
233
233
...
234
234
235
+
.. vclock_0th_component_note_start
236
+
235
237
.. NOTE::
236
238
237
239
Note that a ``vclock`` value might include the 0-th component that is related to local space operations and might differ for different instances in a replica set.
Copy file name to clipboardExpand all lines: doc/how-to/replication/repl_bootstrap_master_master.rst
+310-9
Original file line number
Diff line number
Diff line change
@@ -207,9 +207,9 @@ Checking a replica set status
207
207
name: instance001
208
208
...
209
209
210
-
.. NOTE::
211
-
212
-
Note that a ``vclock`` value might include the 0-th component that is related to local space operations and might differ for different instances in a replica set.
To check that both instances get updates from each other, follow the steps below:
223
223
224
-
1. On ``instance001``, create a space and format it as described in :ref:`CRUD operation examples <box_space_examples>`. Add sample data to this space.
224
+
1. On ``instance001``, create a space, format it, and create a primary index:
4. Get back to ``instance001`` and use ``select`` to make sure new data is replicated.
258
+
4. Get back to ``instance001`` and use ``select`` to make sure new records are replicated.
231
259
232
260
5. Check that :ref:`box.info.vclock <box_introspection-box_info>` values are the same on both instances:
233
261
@@ -237,7 +265,7 @@ To check that both instances get updates from each other, follow the steps below
237
265
238
266
master_master:instance001> box.info.vclock
239
267
---
240
-
- {2: 8, 1: 12}
268
+
- {2: 5, 1: 9}
241
269
...
242
270
243
271
- ``instance002``:
@@ -246,9 +274,282 @@ To check that both instances get updates from each other, follow the steps below
246
274
247
275
master_master:instance002> box.info.vclock
248
276
---
249
-
- {2: 8, 1: 12}
277
+
- {2: 5, 1: 9}
278
+
...
279
+
280
+
281
+
282
+
.. _replication-master-master-resolve-conflicts:
283
+
284
+
Resolving replication conflicts
285
+
-------------------------------
286
+
287
+
.. NOTE::
288
+
289
+
To learn how to fix and prevent replication conflicts using trigger functions, see :ref:`Resolving replication conflicts <replication-problem_solving>`.
After :ref:`reseeding a replica <replication-master-master-reseed-replica>`, you need to resolve a replication conflict that keeps replication stopped:
435
+
436
+
1. Execute ``box.info.replication`` on ``instance001``.
437
+
``upstream.status`` is still stopped:
438
+
439
+
.. code-block:: console
440
+
441
+
master_master:instance001> box.info.replication
442
+
---
443
+
- 1:
444
+
id: 1
445
+
uuid: 4cfa6e3c-625e-b027-00a7-29b2f2182f23
446
+
lsn: 9
447
+
upstream:
448
+
peer: replicator@127.0.0.1:3302
449
+
lag: 143.52251672745
450
+
status: stopped
451
+
idle: 1309.943383
452
+
message: Duplicate key exists in unique index "primary" in space "bands" with
453
+
old tuple - [5, "Pink Floyd", 1965] and new tuple - [5, "incorrect data",
454
+
0]
455
+
name: instance002
456
+
downstream:
457
+
status: follow
458
+
idle: 0.47881799999959
459
+
vclock: {2: 6, 1: 9}
460
+
lag: 0
461
+
2:
462
+
id: 2
463
+
uuid: 9bb111c2-3ff5-36a7-00f4-2b9a573ea660
464
+
lsn: 6
465
+
name: instance001
466
+
...
467
+
468
+
469
+
2. In the ``config.yaml`` file, clear the ``iproto`` option for ``instance001`` by setting its value to ``{}`` to disconnect this instance from ``instance002``.
Before removing an instance from a replica set with :ref:`replication.failover <configuration_reference_replication_failover>` set to ``off``, make sure this instance is in read-only mode.
0 commit comments