[Tarantool-patches] [PATCH v3 09/13] tmx: introduce prepare sequence number
Nikita Pettik
korablev at tarantool.org
Wed Jul 15 20:13:04 MSK 2020
On 15 Jul 16:55, Aleksandr Lyapunov wrote:
> Prepare sequence number is a monotonically increasing ID that is
> assigned to any prepared transaction. This ID is suitable for
> serialization order resolution: the bigger is ID - the latter the
> transaction exist in the serialization order of transactions.
Nit: exists
> Note that id of transactions has quite different order in case
> when transaction could yield - an younger (bigger id) transaction
> can prepare/commit first (lower psn) while older tx sleeps in vain.
>
> Also it should be mentioned that LSN has the same order as PSN,
> but it has two general differences:
> 1. The LSN sequence has no holes, i.e. it is a natural number
> sequence. This property is useless for transaction engine.
> 2. The LSN sequence is provided by WAL writer and thus LSN is not
> available for TX thas was prepared and haven't been committed yet.
Nit: thas -> that
> That feature makes psn more suitable sequence for transactions as
> it allows to order prepared but not committed transaction and
> allows, for example, to create a read view between prepared
> transactions.
>
> Part of #4897
> ---
LGTM
More information about the Tarantool-patches
mailing list