[Tarantool-patches] [PATCH 07/15] tx: save preserve old tuple flag in txn_stmt

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


> diff --git a/src/box/txn.h b/src/box/txn.h
> index 1394bfb..e860e1e 100644
> --- a/src/box/txn.h
> +++ b/src/box/txn.h
> @@ -129,6 +129,15 @@ struct txn_stmt {
>  	struct xrow_header *row;
>  	/** on_commit and/or on_rollback list is not empty. */
>  	bool has_triggers;
> +	/**
> +	 * Whether the stmt upon commit must replace exactly old_tuple from it.
> +	 * Explanation: to the moment of commit of the statement actual state
> +	 * of the space could change due to commit of other transaction(s).
> +	 * Some statements require the replaced tuple at the moment of commit to
> +	 * be exactly the same as replaced tuple at the moment of execution.
> +	 * Some - doesn't.
> +	 */

I still can't understand why is this flag added. Can you provide an example?

> +	bool preserve_old_tuple;

Flag names should be started from is/has/does/... .

>  	/** Commit/rollback triggers associated with this statement. */
>  	struct rlist on_commit;
>  	struct rlist on_rollback;
> 


More information about the Tarantool-patches mailing list