[Tarantool-patches] [PATCH 09/15] tx: introduce prepare sequence number

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Jul 5 20:05:24 MSK 2020


Thanks for the patch!

What are these psns? What are the difference with txn->id and
with lsn?

> diff --git a/src/box/txn.h b/src/box/txn.h
> index e2194b6..cd1665f 100644
> --- a/src/box/txn.h
> +++ b/src/box/txn.h
> @@ -214,6 +214,11 @@ struct txn {
>  	 * Valid IDs start from 1.
>  	 */
>  	int64_t id;
> +	/**
> +	 * A sequential ID that is assigned when the TX become prepared.
> +	 * Transactions are committed on in that order.
> +	 */
> +	int64_t psn;

Why can't you use id?

>  	/** Status of the TX */
>  	enum txn_status status;
>  	/** List of statements in a transaction. */


More information about the Tarantool-patches mailing list