Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Ostanevich <sergos@tarantool.org>
To: Ilya Kosarev <i.kosarev@tarantool.org>
Cc: tarantool-patches@freelists.org,
	tarantool-patches <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [tarantool-patches] [PATCH v4 08/20] refactoring: remove exceptions from func_def_new_from_tuple
Date: Mon, 11 Nov 2019 17:36:48 +0300	[thread overview]
Message-ID: <20191111143648.GA10433@tarantool.org> (raw)
In-Reply-To: <1572433344.407730155@f522.i.mail.ru>

Hi!

No need to discuss - I believe your and Georgy argument is valid. Let it
be like this.

LGTM
Sergos


On 30 Oct 14:02, Ilya Kosarev wrote:
> 
> Hi!
> 
> Thanks for your review.
> I guess it is debatable. On the one hand, it will be easier to understand which line did the error happened in, on the other hand, it looks better, when such blocks are combined. "Better layout" might seem minorish, however, if we need to debug this code, we can alway place a breakpoint and look at old_def & new_def intently to discover which one is actually NULL. Also Georgy recommended the opposite thing in his review for patch 5 ( https://www.freelists.org/post/tarantool-patches/PATCH-v4-0520-refactoring-clear-privilege-managing-triggers-from-exceptions,1 ), so i guess we can discuss it verbally.
> Sincerely,
> Ilya Kosarev
> 
> 
> >Среда, 30 октября 2019, 13:34 +03:00 от Sergey Ostanevich <sergos@tarantool.org>:
> >
> >On 23 Sep 18:56, Ilya Kosarev wrote:
> >
> >Hi! 
> >
> >Just one nit below, LGTM with follow-up.
> >
> >Sergos
> >
> >
> >> func_def_new_from_tuple is used in on_replace_dd_func therefore
> >> it has to be cleared from exceptions. Now it doesn't throw any
> >> more. It means we also need to clear from exceptions it's
> >> subsidiary function func_def_get_ids_from_tuple.
> >> Their usages are updated.
> >> 
> >> Part of #4247
> >> ---
> >>  src/box/alter.cc | 149 ++++++++++++++++++++++++++++++-----------------
> >>  1 file changed, 97 insertions(+), 52 deletions(-)
> >> 
> >> diff --git a/src/box/alter.cc b/src/box/alter.cc
> >> index 10a5f8d64..3d1c59189 100644
> >> --- a/src/box/alter.cc
> >> +++ b/src/box/alter.cc
> >> @@ -3132,6 +3175,8 @@ on_replace_dd_func(struct trigger * /* trigger */, void *event)
> >>  		});
> >>  		old_def = func_def_new_from_tuple(old_tuple);
> >Shall we return error here, rather than possibly mask it with another one at
> >the next line?
> >
> >>  		new_def = func_def_new_from_tuple(new_tuple);
> >> +		if (old_def == NULL || new_def == NULL)
> >> +			return -1;
> >>  		if (func_def_cmp(new_def, old_def) != 0) {
> >>  			diag_set(ClientError, ER_UNSUPPORTED, "function",
> >>  				  "alter");
> >> -- 
> >> 2.17.1
> >> 
> >> 
> 
> 
> -- 
> Ilya Kosarev

  reply	other threads:[~2019-11-11 14:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1569253692.git.i.kosarev@tarantool.org>
     [not found] ` <15e506eb070ddbb0bbb0c0f4388958738f1fbc9a.1569253692.git.i.kosarev@tarantool.org>
     [not found]   ` <20191030085942.GA35607@tarantool.org>
2019-10-30 10:47     ` [Tarantool-patches] [tarantool-patches] [PATCH v4 07/20] refactoring: remove exceptions from index_def_new_from_tuple Ilya Kosarev
2019-10-31  5:02       ` Sergey Ostanevich
     [not found] ` <09dd946a8304f3865ada1638f610a4f9ba2fd3eb.1569253692.git.i.kosarev@tarantool.org>
     [not found]   ` <20191030103454.GB35607@tarantool.org>
2019-10-30 11:02     ` [Tarantool-patches] [tarantool-patches] [PATCH v4 08/20] refactoring: remove exceptions from func_def_new_from_tuple Ilya Kosarev
2019-11-11 14:36       ` Sergey Ostanevich [this message]
     [not found] ` <c7b7c7fd16803e60296be60c3e545dbf2ab61ae8.1569253692.git.i.kosarev@tarantool.org>
     [not found]   ` <1573329671.649762688@f148.i.mail.ru>
2019-11-09 22:52     ` [Tarantool-patches] [tarantool-patches] [PATCH v4 11/20] refactoring: use non _xc version of functions in triggers Ilya Kosarev
2019-11-11 14:37       ` Sergey Ostanevich
     [not found] ` <e5cebfe21734bcfe8b7a8b477968668620cb3aa8.1569253692.git.i.kosarev@tarantool.org>
     [not found]   ` <20191112105951.GC10433@tarantool.org>
2019-11-12 15:32     ` [Tarantool-patches] [tarantool-patches] Re: [PATCH v4 12/20] refactoring: remove exceptions from space_def_new_from_tuple Ilya Kosarev
2019-11-19 15:16       ` Ilya Kosarev
2019-12-16 11:55         ` [Tarantool-patches] [tarantool-patches] Re[2]: " Sergey Ostanevich
     [not found] ` <6f586562e3079b4ca5776b74913894db73bd979f.1569253692.git.i.kosarev@tarantool.org>
     [not found]   ` <20191113133416.dtdgl63r7erfwfht@tarantool.org>
2019-11-13 13:49     ` [Tarantool-patches] [PATCH] refactoring: remove exceptions from fk_constraint_def_new_from_tuple Ilya Kosarev
2019-11-13 16:02       ` Kirill Yukhin
2019-11-13 13:50     ` [Tarantool-patches] [tarantool-patches] Re: [PATCH v4 17/20] " Ilya Kosarev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191111143648.GA10433@tarantool.org \
    --to=sergos@tarantool.org \
    --cc=i.kosarev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [Tarantool-patches] [tarantool-patches] [PATCH v4 08/20] refactoring: remove exceptions from func_def_new_from_tuple' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox