[tarantool-patches] Re: [PATCH] box: add a method to check if transaction is open

Kirill Shcherbatov kshcherbatov at tarantool.org
Mon Sep 10 09:21:43 MSK 2018


Hi! Thank you for a patch. 
> +bool
> +box_is_in_txn()
> +{
> +	return box_txn();
> +}
1. Your function box_is_in_txn is a copy of box_txn routine. There is not reason to introduce it. 
Moreover, box_txn is already exported as public API.

> +- - true
> +...
> +-- close transaction
> +box.commit();
2. Check box.is_in_txn(); here please.

> +-- gh-3518 no active transaction - false
3. Use tarantool codestyle for comments; at first, you need ticket description
--
-- gh-3518: Check if transaction opened.
--
> +box.is_in_txn();
> +-- start transaction
4. With a capital letter and with a dot at the end, please. Same for other comments.




More information about the Tarantool-patches mailing list