tarantool / doc

Tarantool documentation
https://www.tarantool.io/en/doc/
Other
15 stars 43 forks source link

feedback: Automated leader election | Tarantool #2395

Open TarantoolBot opened 2 years ago

TarantoolBot commented 2 years ago

Product: Tarantool Root document: https://www.tarantool.io/en/doc/latest/book/replication/repl_leader_elect/ SME: @ sergepetrenko Peer reviewer:

Details

<…>ese old leader’s transactions since it is not a leader anymore. |Another point to keep in mind is that when a new leader is elected, it won’t automatically finalize synchronous transactions left from the previous leader. This must be done manually using the box.ctl.promote function. In the future, it is going to be done automatically.|

<…>

https://www.tarantool.io/en/doc/latest/book/replication/repl_leader_elect/

@ sergepetrenko said that it is not so.

sergepetrenko commented 2 years ago

Новый лидер (выбранный автоматически) сам зовёт box.ctl.promote(), и становится rw. Так было с самого начала, дополнительных действий при автоматических выборах лидера совершать не нужно.

Если же выборы выключены (election_mode='manual' или election_mode='off'), то лидером управляет пользователь: тот узел, на котором позовут box.ctl.promote() и становится лидером. После этого на нём не нужно выполнять никаких дополнительных действий.