[Tarantool-patches] [PATCH v9 5/7] applier: process synchro requests without txn engine

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sat Aug 22 00:59:44 MSK 2020


Hi! Thanks for the review!

>     diff --git a/src/box/applier.cc b/src/box/applier.cc
>     index 1387d518c..c1d07ca54 100644
>     --- a/src/box/applier.cc
>     +++ b/src/box/applier.cc
>     @@ -847,13 +923,26 @@ applier_apply_tx(struct stailq *rows)
>       }
>       }
>      
>     + if (unlikely(iproto_type_is_synchro_request(first_row->type))) {
>     + /*
>     + * Synchro messages are not transactions, in terms
>     + * of DML. Always sent and written isolated from
>     + * each other.
>     + */
>     + assert(first_row == last_row);
>     + if (apply_synchro_row(first_row) != 0)
>     + diag_raise();
>     + goto success;
>     + }
>     +
>       /**
>       * Explicitly begin the transaction so that we can
>       * control fiber->gc life cycle and, in case of apply
>       * conflict safely access failed xrow object and allocate
>       * IPROTO_NOP on gc.
>       */
>     - struct txn *txn = txn_begin();
>     + struct txn *txn;
>     + txn = txn_begin();
> 
>  
> Why this change?

In C++ you can't declare and assign variables bypassing labels (at
least in clang). It won't compile. Here a new label is added -
'success:'.

But it appeared, that it still allows to declare a variable and
assign it on a next line. So here it is done.


More information about the Tarantool-patches mailing list