From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 DC57643D67A for ; Wed, 16 Oct 2019 00:34:05 +0300 (MSK) Date: Wed, 16 Oct 2019 00:34:05 +0300 From: Nikita Pettik Message-ID: <20191015213405.GB898@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [tarantool-patches] [PATCH v1 0/9] schema: rework _trigger space List-Id: Tarantool development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@freelists.org Cc: tarantool-patches@dev.tarantool.org On 14 Oct 19:03, Kirill Shcherbatov wrote: > This patchset reworks structures that represent SQL triggers to inherent > them from base trigger class. It is an important step to introduce a > LUA persistent trigger in Tarantool as well as to support SQL triggers > evaluation on the server side. To be honest, I don't clearly understand what plan you are following now. I remember that you wrote RFC, what status does it have now? Is it accepted and this preparation is done in accordance with it? If so, let's firstly push RFC. In case RFC is not approved or is changed, it would be nice to see more detailed rationale for these patches.. Personally I've already said (see [dev] [rfc] Persistent triggers in Tarantool thread) that I do not support idea of storing both Lua and SQL trigger's metadata in one space. > In scope of this patchset the _triggers space was extended with a new fields. > The _trigger space updated format is: > [ STRING, UINT32, MAP, STR, > STR, STR, > STR, STR] > Now trigger is produced mostly by tuple-based metadata definition instead of > naive SQL request parsing. > > Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-4343-persistent-triggers > Issue: https://github.com/tarantool/tarantool/issues/4343 > > Kirill Shcherbatov (9): > sql: remove redundant pointer in TriggerStep > box: rename struct trigger to lua_trigger > box: introduce trigger_event_manipulation enum > box: introduce trigger_action_timing enum > sql: use rlist to organize triggers in a list > sql: rework CREATE TABLE rule in parser > sql: wrap all ASTs in sql_trigger_expr structure > sql: inherit sql_trigger from a new trigger class > schema: rework _trigger system space > > src/box/CMakeLists.txt | 2 + > src/box/alter.cc | 438 +++++++++-------- > src/box/alter.h | 34 +- > src/box/applier.cc | 28 +- > src/box/applier.h | 2 +- > src/box/bootstrap.snap | Bin 5934 -> 5981 bytes > src/box/ck_constraint.c | 2 +- > src/box/ck_constraint.h | 4 +- > src/box/errcode.h | 1 + > src/box/error.cc | 2 +- > src/box/fk_constraint.c | 6 +- > src/box/iproto.cc | 4 +- > src/box/lua/call.c | 4 +- > src/box/lua/sequence.c | 4 +- > src/box/lua/space.cc | 4 +- > src/box/lua/tuple.c | 2 +- > src/box/lua/upgrade.lua | 16 + > src/box/memtx_space.c | 8 +- > src/box/recovery.cc | 2 +- > src/box/relay.cc | 6 +- > src/box/replication.cc | 8 +- > src/box/replication.h | 4 +- > src/box/schema.cc | 2 +- > src/box/schema_def.h | 5 + > src/box/session.cc | 4 +- > src/box/session.h | 4 +- > src/box/space.c | 11 +- > src/box/space.h | 4 +- > src/box/sql.c | 105 ++-- > src/box/sql.h | 125 +++-- > src/box/sql/build.c | 97 +++- > src/box/sql/delete.c | 27 +- > src/box/sql/fk_constraint.c | 109 +++-- > src/box/sql/insert.c | 42 +- > src/box/sql/parse.y | 26 +- > src/box/sql/parse_def.h | 29 +- > src/box/sql/prepare.c | 7 +- > src/box/sql/resolve.c | 15 +- > src/box/sql/sqlInt.h | 111 ++--- > src/box/sql/tokenize.c | 16 +- > src/box/sql/trigger.c | 448 ++++++------------ > src/box/sql/update.c | 45 +- > src/box/sql/vdbe.c | 18 +- > src/box/trigger.c | 73 +++ > src/box/trigger.h | 80 ++++ > src/box/trigger_def.c | 131 +++++ > src/box/trigger_def.h | 194 ++++++++ > src/box/txn.c | 8 +- > src/box/txn.h | 14 +- > src/box/vinyl.c | 32 +- > src/box/vy_lsm.c | 2 +- > src/box/vy_scheduler.c | 4 +- > src/box/vy_tx.c | 2 +- > src/lib/core/cbus.c | 2 +- > src/lib/core/fiber.c | 6 +- > src/lib/core/trigger.cc | 6 +- > src/lib/core/trigger.h | 20 +- > src/lib/swim/swim.c | 2 +- > src/lua/swim.c | 2 +- > src/lua/trigger.c | 6 +- > src/lua/trigger.h | 2 +- > src/lua/utils.h | 2 +- > src/main.cc | 4 +- > test/box-py/bootstrap.result | 5 +- > test/box/access_misc.result | 139 +++--- > test/box/misc.result | 1 + > test/sql/ddl.result | 6 +- > test/sql/ddl.test.lua | 6 +- > .../gh2141-delete-trigger-drop-table.result | 36 +- > .../gh2141-delete-trigger-drop-table.test.lua | 4 +- > test/sql/persistency.result | 36 +- > test/sql/persistency.test.lua | 8 +- > test/sql/triggers.result | 91 ++-- > test/sql/triggers.test.lua | 30 +- > test/sql/upgrade.result | 16 +- > test/sql/upgrade.test.lua | 4 +- > test/unit/CMakeLists.txt | 3 +- > test/unit/cbus.c | 6 +- > test/unit/swim.c | 14 +- > test/unit/swim_test_utils.c | 6 +- > 80 files changed, 1695 insertions(+), 1139 deletions(-) > create mode 100644 src/box/trigger.c > create mode 100644 src/box/trigger.h > create mode 100644 src/box/trigger_def.c > create mode 100644 src/box/trigger_def.h > > -- > 2.23.0 > >