From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [94.100.177.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 183C746970E for ; Sun, 22 Dec 2019 17:59:54 +0300 (MSK) References: <1b936f83be688cbbc8a1625be61a2841809b5633.1574965971.git.roman.habibov@tarantool.org> <77b2090c-4bfd-c42c-e744-3395eef2e8a3@tarantool.org> <721EA98D-2EC6-4C4C-97B0-6BCEBE889EDA@tarantool.org> <20191221205437.GA45@tarantool.org> From: Vladislav Shpilevoy Message-ID: <9e1947e1-2cba-f94a-476d-210f6c47acbb@tarantool.org> Date: Sun, 22 Dec 2019 15:59:52 +0100 MIME-Version: 1.0 In-Reply-To: <20191221205437.GA45@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v2 2/3] box: make constraint operations transactional List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Ostanevich , Roman Khabibov Cc: tarantool-patches@dev.tarantool.org Hi! Thanks for the review! On 21/12/2019 21:54, Sergey Ostanevich wrote: > Hi! > > Im looking to the latest branch romanhabibov/gh-3503-constr-names_v3, > apparently with changes from Vlad? > > Although the change is simple, it is not relevant to the patchset? The change is relevant, because allows to simplify CreateConstraintID object creation. > > @@ -1408,14 +1419,14 @@ ModifyIndex::~ModifyIndex() > /** CreateIndex - add a new index to the space. */ > class CreateIndex: public AlterSpaceOp > { > -public: > - CreateIndex(struct alter_space *alter) > - :AlterSpaceOp(alter), new_index(NULL), new_index_def(NULL) > - {} > /** New index. */ > struct index *new_index; > /** New index index_def. */ > struct index_def *new_index_def; > +public: > + CreateIndex(struct alter_space *alter, struct index_def *def) > + :AlterSpaceOp(alter), new_index(NULL), new_index_def(def) > + {} > virtual void alter_def(struct alter_space *alter); > virtual void prepare(struct alter_space *alter); > virtual void commit(struct alter_space *alter, int64_t lsn); > > And I'm still not sure about memory allocation/deallocation is correct during > constraint id creation/drop. If you've found an error, then please, share. I fixed all the problems I found. > > Regards, > Sergos >