Суббота, 22 августа 2020, 0:59 +03:00 от Vladislav Shpilevoy <v.shpilevoy@tarantool.org>:
 
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.
I see. Thanks for the explanation!
 
 
--
Serge Petrenko