Skip to content

Commit 3deeb0e

Browse files
committed
Resolve file conflicts
1 parent dcdeab2 commit 3deeb0e

File tree

4 files changed

+47
-14
lines changed

4 files changed

+47
-14
lines changed

doc/concepts/replication/repl_leader_elect.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ Eventually, there will be two sets of nodes with the diverged data,
122122
and any node from one set is disconnected from any node from the other set with the ``ER_SPLIT_BRAIN`` error.
123123

124124
Once noticing the error, a user can choose any representative from each of the sets and inspect the data on them.
125-
To correlate the data, the user should remove it from the nodes of one set, and reconnect them to the nodes from the other set that have the correct data.
126-
125+
To correlate the data, the user should remove it from the nodes of one set,
126+
and reconnect them to the nodes from the other set that have the correct data.
127127

128128
Also, if election is enabled on the node, it won't replicate from any nodes except
129129
the newest leader. This is done to avoid the issue when a new leader is elected,

doc/how-to/replication/repl_sync.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,16 @@ To control the behavior of synchronous transactions, there exist global
2121
2222
box.cfg{replication_synchro_quorum = <number of instances>}
2323
24-
This option tells how many replicas should confirm the receipt of a synchronous
25-
transaction before it is committed. Since version :doc:`2.10.0 </release/2.10.0>`,
26-
this option does not account for anonymous replicas. As a usage example, consider this:
24+
.. code-block:: lua
25+
26+
box.cfg{replication_synchro_quorum = "N / 2 + 1"}
27+
28+
This option tells how many replicas should confirm the receipt of a synchronous transaction before it is committed.
29+
Since version :doc:`2.5.3 </release/2.5.3>`, the parameter supports dynamic evaluation of the quorum number
30+
(see :ref:`reference for the replication_synchro_quorum parameter <cfg_replication-replication_synchro_quorum>` for details).
31+
Since version :doc:`2.10.0 </release/2.10.0>`,
32+
this option does not account for anonymous replicas.
33+
As a usage example, consider this:
2734

2835
.. code-block:: lua
2936

doc/reference/configuration/cfg_replication.rst

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,18 +428,39 @@
428428
This option tells how many replicas should confirm the receipt of a
429429
synchronous transaction before it can finish its commit.
430430

431+
Since version :doc:`2.5.3 </release/2.5.3>`,
432+
the option supports dynamic evaluation of the quorum number.
433+
That is, the number of quorum can be specified not as a constant number, but as a function instead.
434+
In this case, the option returns the formula evaluated.
435+
The result is treated as an integer number.
436+
Once any replicas are added or removed, the expression is re-evaluated automatically.
437+
438+
For example,
439+
440+
.. code-block:: lua
441+
442+
box.cfg{replication_synchro_quorum = "N / 2 + 1"}
443+
444+
Where `N` is a current number of registered replicas in a cluster.
445+
446+
Keep in mind that the example above represents a canonical quorum definition.
447+
The formula ``at least 50% of the cluster size + 1`` guarantees data reliability.
448+
Using a value less than the canonical one might lead to unexpected results,
449+
including a :ref:`split-brain <repl_leader_elect_splitbrain>`.
450+
431451
Since version :doc:`2.10.0 </release/2.10.0>`, this option
432452
does not account for anonymous replicas.
433453

434-
It is 1 by default, so synchronous transactions work like asynchronous when
435-
not configured. 1 means successful WAL write on master is enough for
436-
commit.
454+
The default value for this parameter is ``N / 2 + 1``.
437455

438456
It is not used on replicas, so if the master dies, the pending synchronous
439457
transactions will be kept waiting on the replicas until a new master is elected.
440458

459+
If the value for this option is set to ``1``, the synchronous transactions work like asynchronous when not configured.
460+
`1` means that successful WAL write to the master is enough to commit.
461+
441462
| Type: number
442-
| Default: 1
463+
| Default: N / 2 + 1 (before version :doc:`2.10.0 </release/2.10.0>`, the default value was 1)
443464
| Environment variable: TT_REPLICATION_SYNCHRO_QUORUM
444465
| Dynamic: **yes**
445466

locale/ru/LC_MESSAGES/reference/configuration/index.po

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,12 +1972,9 @@ msgid ""
19721972
msgstr ""
19731973

19741974
msgid ""
1975-
"It is 1 by default, so synchronous transactions work like asynchronous when "
1976-
"not configured. 1 means successful WAL write on master is enough for commit."
1975+
"The default value for this parameter is ``N / 2 + 1``."
19771976
msgstr ""
1978-
"По умолчанию она равна 1, поэтому синхронные транзакции работают как "
1979-
"асинхронные, пока они не настроены. 1 означает, что для коммита достаточно "
1980-
"успешной записи в WAL на мастере."
1977+
"По умолчанию значение параметра равно ``N / 2 + 1``."
19811978

19821979
msgid ""
19831980
"It is not used on replicas, so if the master dies, the pending synchronous "
@@ -1988,6 +1985,14 @@ msgstr ""
19881985
"синхронные транзакции будут ждать на репликах до тех пор, пока не будет "
19891986
"выбран новый мастер."
19901987

1988+
msgid ""
1989+
"If the value for this option is set to ``1``, the synchronous transactions work like asynchronous when "
1990+
"not configured. `1` means that successful WAL write to the master is enough to commit."
1991+
msgstr ""
1992+
"Если значение параметра равно `1`, синхронные транзакции работают как "
1993+
"асинхронные, пока они не настроены. `1` означает, что для коммита достаточно "
1994+
"успешной записи в WAL на мастере."
1995+
19911996
msgid ""
19921997
"Since version :doc:`2.5.1 </release/2.5.1>`. For :ref:`synchronous "
19931998
"replication <repl_sync>` only. Tells how many seconds to wait for a "

0 commit comments

Comments
 (0)