replication: prohibit roll back due to `replication_synchro_timeout`
Summary
- replication: prohibit roll back due to
replication_synchro_timeout
To better match the canonical Raft design, this patch prohibits automatic
transaction rollback due to replication.synchro_timeout. A new compat
option has been added for this purpose. The compat option is named
compat.replication_synchro_timeout and is 'old' by default. When set
to 'new', the replication.synchro_timeout option has slightly different
semantics. With this semantics, transactions are no longer rolled back at
this timeout, replication.synchro_timeout is used only to wait
confirmation in promote/demote and gc-checkpointing. If some transaction
in limbo did not have time to commit within replication_synchro_timeput,
the corresponding operation: promote/demote or gc-checkpointing can be
aborted automatically (in this aspect, the behavior of the option is no
different from what it was before). If 'old' is set, the option has the
same semantics as before.
In order to be able to understand from the code what value the
compat.replication_synchro_timeout option is set to - 'old' or 'new',
a special Boolean tweak replication_synchro_timeout_enabled was
introduced.
Note that PROMOTE and DEMOTE can still rollback a transaction. Only the ability to rollback by timeout has been prohibited.
Closes #7486
@TarantoolBot document Title: new compat option: 'compat.replication_synchro_timeout' Product: Tarantool Since: 3.3
Root document: New page - https://www.tarantool.io/en/doc/latest/reference/reference_lua/compat/replication_synchro_timeout/
The compat module allows you to choose between:
- the old behavior: unconfirmed synchronous transactions are rolled back
after a
replication.synchro_timeout. - and the new behavior: A synchronous transaction can remain in the synchro
queue indefinitely until it reaches a quorum of confirmations.
replication.synchro_timeoutis used only to wait confirmation in promote/demote and gc-checkpointing. If some transaction in limbo did not have time to commit withinreplication_synchro_timeput, the corresponding operation: promote/demote or gc-checkpointing can be aborted automatically.
Close #... Docs follow-up: not necessary / new issue
Ref #73 (closed)