<HTML><BODY><p style="font-family: Arial, Tahoma, Verdana, sans-serif;" data-mce-style="font-family: Arial, Tahoma, Verdana, sans-serif;">Hi!<br><br>Thanks for your review.</p><p style="font-family: Arial, Tahoma, Verdana, sans-serif;" data-mce-style="font-family: Arial, Tahoma, Verdana, sans-serif;">Yes, it is already done in patch 5 of this patchset named refactoring: clear privilege managing triggers from exceptions.<br></p><p style="font-family: Arial, Tahoma, Verdana, sans-serif;" data-mce-style="font-family: Arial, Tahoma, Verdana, sans-serif;"><span style="color: #222222;font-family: Rubik, Arial, sans-serif;font-size: 17px;" data-mce-style="color: #222222; font-family: Rubik, Arial, sans-serif; font-size: 17px;">Sincerely,<br></span>Ilya Kosarev</p><br><br><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">
        Среда, 16 октября 2019, 17:28 +03:00 от Sergey Ostanevich <sergos@tarantool.org>:<br>
        <br>
        <div id="">






<div class="js-helper js-readmsg-msg">
        <style type="text/css"></style>
        <div>
                
                
            <div id="style_15712361280154716893_BODY">Hi!<br>
<br>
<br>
<br>
On 23 Sep 18:56, Ilya Kosarev wrote:<br>
> replica_check_id is used in on_replace_dd_cluster trigger<br>
> therefore it has to be cleared from exceptions. Now it doesn't<br>
> throw any more. It's usages are updated.<br>
> <br>
> Part of #4247<br>
> ---<br>
>  src/box/alter.cc       |  6 ++++--<br>
>  src/box/replication.cc | 21 ++++++++++++++-------<br>
>  src/box/replication.h  |  2 +-<br>
>  3 files changed, 19 insertions(+), 10 deletions(-)<br>
> <br>
> diff --git a/src/box/alter.cc b/src/box/alter.cc<br>
> index 1fce160f5..d4cb9e8d8 100644<br>
> --- a/src/box/alter.cc<br>
> +++ b/src/box/alter.cc<br>
> @@ -3627,7 +3627,8 @@ on_replace_dd_cluster(struct trigger *trigger, void *event)<br>
>            /* Check fields */<br>
>            uint32_t replica_id =<br>
>                    tuple_field_u32_xc(new_tuple, BOX_CLUSTER_FIELD_ID);<br>
> -          replica_check_id(replica_id);<br>
> +          if (replica_check_id(replica_id) != 0)<br>
> +                  return -1;<br>
>            tt_uuid replica_uuid;<br>
>            tuple_field_uuid_xc(new_tuple, BOX_CLUSTER_FIELD_UUID,<br>
>                                &replica_uuid);<br>
> @@ -3665,7 +3666,8 @@ on_replace_dd_cluster(struct trigger *trigger, void *event)<br>
>            assert(old_tuple != NULL);<br>
>            uint32_t replica_id =<br>
>                    tuple_field_u32_xc(old_tuple, BOX_CLUSTER_FIELD_ID);<br>
> -          replica_check_id(replica_id);<br>
> +          if (replica_check_id(replica_id) != 0)<br>
> +                  return -1;<br>
>  <br>
>            struct trigger *on_commit;<br>
>            on_commit = txn_alter_trigger_new(unregister_replica,<br>
<br>
<br>
Every call of txn_alter_trigger_new() in on_replace_dd_cluster() also needs<br>
error handling.<br>
<br>
Sergos.<br>
<br>
</div>
            
        
                
        </div>

        
</div>


</div>
</blockquote>
<br>
<br>-- <br>Ilya Kosarev<br></BODY></HTML>