<HTML><BODY><div> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Суббота, 22 августа 2020, 0:59 +03:00 от Vladislav Shpilevoy <v.shpilevoy@tarantool.org>:<br> <div id=""><div class="js-helper js-readmsg-msg"><style type="text/css"></style><div><div id="style_15980471851062900993_BODY">Hi! Thanks for the review!<br> <div class="mail-quote-collapse">> diff --git a/src/box/applier.cc b/src/box/applier.cc<br>> index 1387d518c..c1d07ca54 100644<br>> --- a/src/box/applier.cc<br>> +++ b/src/box/applier.cc<br>> @@ -847,13 +923,26 @@ applier_apply_tx(struct stailq *rows)<br>> }<br>> }<br>> <br>> + if (unlikely(iproto_type_is_synchro_request(first_row->type))) {<br>> + /*<br>> + * Synchro messages are not transactions, in terms<br>> + * of DML. Always sent and written isolated from<br>> + * each other.<br>> + */<br>> + assert(first_row == last_row);<br>> + if (apply_synchro_row(first_row) != 0)<br>> + diag_raise();<br>> + goto success;<br>> + }<br>> +<br>> /**<br>> * Explicitly begin the transaction so that we can<br>> * control fiber->gc life cycle and, in case of apply<br>> * conflict safely access failed xrow object and allocate<br>> * IPROTO_NOP on gc.<br>> */<br>> - struct txn *txn = txn_begin();<br>> + struct txn *txn;<br>> + txn = txn_begin();<br>><br>> <br>> Why this change?</div><br>In C++ you can't declare and assign variables bypassing labels (at<br>least in clang). It won't compile. Here a new label is added -<br>'success:'.<br><br>But it appeared, that it still allows to declare a variable and<br>assign it on a next line. So here it is done.</div></div></div></div></blockquote><div><div>I see. Thanks for the explanation!</div><div> </div><div> </div><div><div>--<br>Serge Petrenko</div></div><div> </div></div><div> </div></BODY></HTML>