[Tarantool-patches] [PATCH 3/6] test/unit: snap_quorum_delay -- stop using txn_set_flag

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sat Jan 30 22:17:57 MSK 2021


Hi! Thanks for the patch!

Ok, I assume it is fine to drop these functions one by one, even
though it leaves the flags usage inconsistent between the commits.

But why the hell did you split even one function clearance into 2
commits? Why couldn't this commit be a part of the previous commit?

Any why couldn't you delete the unused txn_..._flag() helpers along
with their usage?

On 22.01.2021 14:26, Cyrill Gorcunov via Tarantool-patches wrote:
> Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
> ---
>  test/unit/snap_quorum_delay.cc | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/test/unit/snap_quorum_delay.cc b/test/unit/snap_quorum_delay.cc
> index b9d4cc6c4..ec78f837d 100644
> --- a/test/unit/snap_quorum_delay.cc
> +++ b/test/unit/snap_quorum_delay.cc
> @@ -98,8 +98,7 @@ txn_process_func(va_list ap)
>  	struct txn *txn = txn_begin();
>  	txn->fiber = fiber();
>  	/* Simulate a sync transaction. */
> -	txn_set_flag(txn, TXN_WAIT_SYNC);
> -	txn_set_flag(txn, TXN_WAIT_ACK);
> +	txn->flags |= TXN_WAIT_SYNC | TXN_WAIT_ACK;
>  	/*
>  	 * The true way to push the transaction to limbo is to call
>  	 * txn_commit() for sync transaction. But, if txn_commit()
> 


More information about the Tarantool-patches mailing list