From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [94.100.177.101]) (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 0171246970F for ; Tue, 26 Nov 2019 18:07:11 +0300 (MSK) Date: Tue, 26 Nov 2019 18:07:11 +0300 From: Sergey Ostanevich Message-ID: <20191126150711.GA1718@tarantool.org> References: <98d7a71916864790f690835d7b25336dfece196e.1574390065.git.i.kosarev@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <98d7a71916864790f690835d7b25336dfece196e.1574390065.git.i.kosarev@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v5 1/8] refactoring: wrap new operator calls in triggers List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ilya Kosarev Cc: tarantool-patches@dev.tarantool.org Hi! One nit below, otherwise LGTM. Sergos On 22 Nov 05:46, Ilya Kosarev wrote: > @@ -5562,13 +5611,19 @@ on_replace_dd_func_index(struct trigger *trigger, void *event) > if (alter == NULL) > return -1; > auto scoped_guard = make_scoped_guard([=] {alter_space_delete(alter);}); > - alter_space_move_indexes(alter, 0, index->def->iid); > - (void) new RebuildFuncIndex(alter, index->def, func); > - alter_space_move_indexes(alter, index->def->iid + 1, > - space->index_id_max + 1); > - (void) new MoveCkConstraints(alter); > - (void) new UpdateSchemaVersion(alter); > + if (alter_space_move_indexes(alter, 0, index->def->iid) != 0) > + return -1; > try { > + (void) new RebuildFuncIndex(alter, index->def, func); > + } catch (Exception *e) { > + return -1; > + } > + if (alter_space_move_indexes(alter, index->def->iid + 1, > + space->index_id_max + 1) != 0) indentation is broken for the line above - need 4 extra spaces. > + return -1; > + try { > + (void) new MoveCkConstraints(alter); > + (void) new UpdateSchemaVersion(alter); > alter_space_do(stmt, alter); > } catch (Exception *e) { > return -1; > -- > 2.17.1 >