Skip to content

Commit bd0555a

Browse files
authored
Feedback: fixes and improvements (#3564)
* Add warning about sync and async transactions in the sync replication section * Fix typo in the access control section * Some minor translation fixes Fixes #3533 Fixes #3560
1 parent 5bcfb0b commit bd0555a

File tree

3 files changed

+61
-10
lines changed

3 files changed

+61
-10
lines changed

doc/concepts/replication/repl_sync.rst

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,37 @@ When there is more than one synchronous transaction, they all wait for being
2929
replicated. Moreover, if an asynchronous transaction appears, it will
3030
also be blocked by the existing synchronous transactions. This behavior is very
3131
similar to a regular queue of asynchronous transactions because all the transactions
32-
are committed in the same order as they make the ``box.commit()`` call.
32+
are committed in the same order as they make the :ref:`box.commit() <box-commit>` call.
3333
So, here comes **the commit rule**:
3434
transactions are committed in the same order as they make
35-
the ``box.commit()`` callregardless of being synchronous or asynchronous.
35+
the ``box.commit()`` call -- regardless of being synchronous or asynchronous.
3636

3737
If one of the waiting synchronous transactions times out and is rolled back, it
3838
will first roll back all the newer pending transactions. Again, just like how
3939
asynchronous transactions are rolled back when WAL write fails.
4040
So, here comes **the rollback rule:**
4141
transactions are always rolled back in the order reversed from the one they
42-
make the ``box.commit()`` callregardless of being synchronous or asynchronous.
42+
make the ``box.commit()`` call -- regardless of being synchronous or asynchronous.
4343

4444
One more important thing is that if an asynchronous transaction is blocked by
4545
a synchronous transaction, it does not become synchronous as well.
4646
This just means it will wait for the synchronous transaction to be committed.
4747
But once it is done, the asynchronous transaction will be committed
48-
immediately—it won't wait for being replicated itself.
48+
immediately -- it won't wait for being replicated itself.
49+
50+
.. warning::
51+
52+
Be careful when using synchronous and asynchronous transactions together.
53+
Asynchronous transactions are considered committed even if there is no connection to other nodes.
54+
Therefore, an old leader node (:ref:`synchronous transaction queue owner <box_info_synchro>`) might have some
55+
committed asynchronous transactions that no other replica set member has.
56+
57+
When the connection to such an old (previous) leader node is restored, it starts receiving data from the new leader.
58+
At the same time, other replica set members receive the data from the previous leader that they don't have yet.
59+
The data from the previous leader contains some committed asynchronous transactions.
60+
At this time, the integrity protection will throw
61+
the :ref:`ER_SPLIT_BRAIN <repl_leader_elect_splitbrain>` error, which will force the user to rebootstrap the previous leader.
62+
4963

5064
Limitations and known problems
5165
------------------------------

locale/ru/LC_MESSAGES/book/admin/access_control.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ msgid ""
264264
msgstr ""
265265
"'usage' (использование), например, допустимо ли любое действие, несмотря на "
266266
"другие права (иногда удобно отменить право на использование, чтобы временно "
267-
"заблокировать пользователя, не удаляя ег"
267+
"заблокировать пользователя, не удаляя его"
268268

269269
msgid "'session', e.g. whether the user can 'connect'."
270270
msgstr ""

locale/ru/LC_MESSAGES/concepts/replication/repl_sync.po

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ msgstr ""
2727
"проходит коммит лишь после репликации на некотором количестве экземпляров, и"
2828
" только тогда клиенту приходит ответ о завершении транзакции."
2929

30+
msgid ""
31+
"To learn how to enable and use synchronous replication, "
32+
"check the :ref:`guide <how-to-repl_sync>`."
33+
msgstr ""
34+
"Подробная информация о включении и настройке синхронной репликации "
35+
"приведена в :ref:`соответствующем руководстве <how-to-repl_sync>`."
36+
3037
msgid "Synchronous and asynchronous transactions"
3138
msgstr "Синхронные и асинхронные транзакции"
3239

@@ -46,14 +53,14 @@ msgid ""
4653
"be blocked by the existing synchronous transactions. This behavior is very "
4754
"similar to a regular queue of asynchronous transactions because all the "
4855
"transactions are committed in the same order as they make the "
49-
"``box.commit()`` call. So, here comes **the commit rule**: transactions are "
56+
":ref:`box.commit() <box-commit>` call. So, here comes **the commit rule**: transactions are "
5057
"committed in the same order as they make the ``box.commit()`` "
51-
"callregardless of being synchronous or asynchronous."
58+
"call -- regardless of being synchronous or asynchronous."
5259
msgstr ""
5360
"Если наряду с несколькими синхронными транзакциями, ожидающими репликации, "
5461
"совершается асинхронная транзакция, она блокируется синхронными. Коммиты при"
5562
" этом выполняются в той последовательности, в которой для каждой из "
56-
"транзакций вызывается метод ``box.commit()``. Похожим образом работает "
63+
"транзакций вызывается метод :ref:`box.commit() <box-commit>`. Похожим образом работает "
5764
"обычная очередь асинхронных транзакций. Можно сформулировать **правило "
5865
"коммитов**: порядок коммитов соответствует порядку вызова ``box.commit()`` "
5966
"для каждой из транзакций, независимо от того, синхронные транзакции или "
@@ -65,7 +72,7 @@ msgid ""
6572
"like how asynchronous transactions are rolled back when WAL write fails. So,"
6673
" here comes **the rollback rule:** transactions are always rolled back in "
6774
"the order reversed from the one they make the ``box.commit()`` "
68-
"callregardless of being synchronous or asynchronous."
75+
"call -- regardless of being synchronous or asynchronous."
6976
msgstr ""
7077
"Если для одной из синхронных транзакций истечет время ожидания, эта "
7178
"транзакция будет отменена, а вместе с ней и все последующие транзакции в "
@@ -79,13 +86,43 @@ msgid ""
7986
"by a synchronous transaction, it does not become synchronous as well. This "
8087
"just means it will wait for the synchronous transaction to be committed. But"
8188
" once it is done, the asynchronous transaction will be committed "
82-
"immediatelyit won't wait for being replicated itself."
89+
"immediately -- it won't wait for being replicated itself."
8390
msgstr ""
8491
"Асинхронная транзакция, заблокированная синхронной, не становится сама "
8592
"синхронной, а просто ожидает коммита синхронной транзакции. Как только это "
8693
"произойдет, асинхронная транзакция сразу сможет пройти коммит, не ожидая "
8794
"репликации."
8895

96+
msgid ""
97+
"Be careful when using synchronous and asynchronous transactions together. "
98+
"Asynchronous transactions are considered committed even if there is no "
99+
"connection to other nodes. Therefore, an old leader node "
100+
"(:ref:`synchronous transaction queue owner <box_info_synchro>`) might have "
101+
"some committed asynchronous transactions that no other replica set member has."
102+
msgstr ""
103+
"Будьте осторожны при одновременном использовании синхронных и асинхронных транзакций. "
104+
"Для асинхронных транзакций коммит засчитывается успешным даже в том случае, если нет "
105+
"соединения с другими узлами. Поэтому на старом ``leader``-узле "
106+
"(:ref:`владельце очереди синхронных транзакций <box_info_synchro>`) могут быть "
107+
"асинхронные транзакции, которые прошли коммит, но отсутствуют на других узлах набора реплик."
108+
109+
msgid ""
110+
"When the connection to such an old (previous) leader node is restored, "
111+
"it starts receiving data from the new leader. At the same time, "
112+
"other replica set members receive the data from the previous leader that they don't have yet. "
113+
"The data from the previous leader contains some committed asynchronous transactions. "
114+
"At this time, the integrity protection "
115+
"will throw the :ref:`ER_SPLIT_BRAIN <repl_leader_elect_splitbrain>` error, "
116+
"which will force the user to rebootstrap the previous leader."
117+
msgstr ""
118+
"Когда предыдущий лидер снова становится доступен в наборе реплик, "
119+
"он начинает получать данные с нового лидера. В это же время "
120+
"остальные узлы в наборе реплик начинают получать данные со старого лидера, которых у них еще нет. "
121+
"Эти данные содержат и асинхронные транзакции, прошедшие коммит. "
122+
"В этот момент система выдаст ошибку "
123+
":ref:`ER_SPLIT_BRAIN <repl_leader_elect_splitbrain>`, заставляя "
124+
"пользователя провести повторную настройку (rebootstrap) предыдущего лидера."
125+
89126
msgid "Limitations and known problems"
90127
msgstr "Ограничения и известные проблемы"
91128

0 commit comments

Comments
 (0)