[Tarantool-patches] [PATCH v3 09/13] tmx: introduce prepare sequence number

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Jul 16 03:11:40 MSK 2020


Thanks for the patch!

On 15.07.2020 15: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

1. Latter -> later.

> transaction exist in the serialization order of transactions.

2. What it means 'later in the order'? It can mean both older and
newer depending on from where to count. Would be better to call it
explicitly 'newer' or 'older'.

> 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.
> 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.


More information about the Tarantool-patches mailing list