[Tarantool-patches] [PATCH v5 1/8] refactoring: wrap new operator calls in triggers
Sergey Ostanevich
sergos at tarantool.org
Tue Nov 26 18:07:11 MSK 2019
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
>
More information about the Tarantool-patches
mailing list