From: Nikita Pettik <korablev@tarantool.org> To: Sergey Ostanevich <sergos@tarantool.org> Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v2 2/3] box: make constraint operations transactional Date: Mon, 30 Dec 2019 14:05:56 +0200 [thread overview] Message-ID: <20191230120556.GA32406@tarantool.org> (raw) In-Reply-To: <20191230111219.GE1222@tarantool.org> On 30 Dec 14:12, Sergey Ostanevich wrote: > Hi! > > I didn't find any issues, let's push it. Pushed to master. > Regards, > Sergos > > On 30 Dec 00:28, Nikita Pettik wrote: > > On 29 Dec 18:51, Vladislav Shpilevoy wrote: > > > >>>> index c660b1c70..094a63ee1 100644 > > > >>>> --- a/src/box/errcode.h > > > >>>> +++ b/src/box/errcode.h > > > >>>> @@ -222,7 +222,7 @@ struct errcode_record { > > > >>>> /*167 */_(ER_CREATE_FK_CONSTRAINT, "Failed to create foreign key constraint '%s': %s") \ > > > >>>> /*168 */_(ER_DROP_FK_CONSTRAINT, "Failed to drop foreign key constraint '%s': %s") \ > > > >>>> /*169 */_(ER_NO_SUCH_CONSTRAINT, "Constraint %s does not exist") \ > > > >>>> - /*170 */_(ER_CONSTRAINT_EXISTS, "Constraint %s already exists") \ > > > >>>> + /*170 */_(ER_CONSTRAINT_EXISTS, "Constraint %s '%s' already exists in space '%s'") \ > > > >>> > > > >>> I'd better place type of constraint at the beggining of sentence: > > > >>> > > > >>> Check constraint xxx already exists > > > >>> Foreign key constraint ... > > > >>> Unique constraint ... > > > >>> > > > >>> Sounds way much better, doesn't it? > > > >> > > > >> It is subjective. I changed it to this order on purpose. > > > >> 1) Because I wanted to go from more common term to a more > > > >> concrete: 'Constraint' - common, <constraint type> - more > > > >> concrete, <name> - even more concrete. > > > >> 2) Because when I see '<type> constraint <name> already exists ...' > > > >> for me it looks like someone tried to create constraint of > > > >> type <type>. But it is not always so. Type is not the most > > > >> important part of the message. > > > > > > > > Well, I think it may turn out to be good argument. Why do > > > > you add type of constraint to message at all? My guess > > > > is to simplify user's life and make finding constraint > > > > with given name easy. If so, does it make sense? > > > > > > Your guess is right. I wanted to make it simpler to determine > > > with what a constraint there is a conflict. So as a user could > > > do rename of index/fk/ck/whatever-else which occupies the needed > > > name. > > > > I mean if user finds out that name is already occupied, > > one is likely to use another name rather than drop/rename > > existing constraint. In this case type of constraint is not > > vital. > > > > Anyway, patch LGTM. This is second one approve so it can be pushed, > > but Sergos wrote that he is concerned about memory management > > during constraint id creation/drop. Sergos, did you find any > > issues, or we can push this patch? > >
next prev parent reply other threads:[~2019-12-30 12:05 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-28 18:34 [Tarantool-patches] [PATCH v2 0/2] Add constraint names hash table to space Roman Khabibov 2019-11-28 18:34 ` [Tarantool-patches] [PATCH v2 1/2] box: introduce constraint names hash table Roman Khabibov 2019-11-30 1:03 ` Vladislav Shpilevoy 2019-12-04 16:23 ` [Tarantool-patches] [PATCH v2 1/3] " Roman Khabibov 2019-12-07 16:34 ` Vladislav Shpilevoy 2019-12-10 12:48 ` Roman Khabibov 2019-11-28 18:34 ` [Tarantool-patches] [PATCH v2 2/2] sql: make constraint operations transactional Roman Khabibov 2019-11-29 7:38 ` Roman Khabibov 2019-11-30 1:03 ` Vladislav Shpilevoy 2019-12-04 16:23 ` [Tarantool-patches] [PATCH v2 2/3] " Roman Khabibov 2019-12-05 18:43 ` Roman Khabibov 2019-12-07 16:35 ` Vladislav Shpilevoy 2019-12-10 12:49 ` [Tarantool-patches] [PATCH v2 2/3] box: " Roman Khabibov 2019-12-15 22:26 ` Vladislav Shpilevoy 2019-12-17 15:03 ` Roman Khabibov 2019-12-28 0:18 ` Nikita Pettik 2019-12-28 11:07 ` Vladislav Shpilevoy 2019-12-29 0:07 ` Nikita Pettik 2019-12-29 15:51 ` Vladislav Shpilevoy 2019-12-29 22:28 ` Nikita Pettik 2019-12-29 22:35 ` Vladislav Shpilevoy 2019-12-30 11:12 ` Sergey Ostanevich 2019-12-30 12:05 ` Nikita Pettik [this message] 2019-12-21 20:54 ` Sergey Ostanevich 2019-12-22 14:59 ` Vladislav Shpilevoy 2019-12-24 12:06 ` Roman Khabibov 2019-11-30 1:03 ` [Tarantool-patches] [PATCH v2 0/2] Add constraint names hash table to space Vladislav Shpilevoy 2019-12-04 16:23 ` [Tarantool-patches] [PATCH v2 0/3] " Roman Khabibov 2019-12-07 16:34 ` Vladislav Shpilevoy
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=20191230120556.GA32406@tarantool.org \ --to=korablev@tarantool.org \ --cc=sergos@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v2 2/3] box: make constraint operations transactional' \ /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