From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 85FC120DDD for ; Tue, 30 Jul 2019 08:13:11 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZIQ-CnrCFqpJ for ; Tue, 30 Jul 2019 08:13:11 -0400 (EDT) Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 4725F1FF78 for ; Tue, 30 Jul 2019 08:13:11 -0400 (EDT) Received: by smtp16.mail.ru with esmtpa (envelope-from ) id 1hsR09-0003Me-EV for tarantool-patches@freelists.org; Tue, 30 Jul 2019 15:13:09 +0300 Date: Tue, 30 Jul 2019 15:13:08 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v2 3/3] txn: undo commit/rollback triggers when reverting to savepoint Message-ID: <20190730121308.GF21469@atlas> References: <7ad716954266e012348a133f70825444205c64be.1564483378.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7ad716954266e012348a133f70825444205c64be.1564483378.git.vdavydov.dev@gmail.com> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org * Vladimir Davydov [19/07/30 15:04]: > When reverting to a savepoint inside a DDL transaction, apart from > undoing changes done by the DDL statements to the system spaces, we also > have to > > - Run rollback triggers installed after the savepoint was set, because > otherwise changes done to the schema by DDL won't be undone. > - Remove commit triggers installed after the savepoint, because they > are not relevant anymore, apparently. > > To achieve that let's append DDL triggers right to txn statements. > This allows us to easily discard commit triggers and run rollback > triggers when a statement is rolled back. > > Note, txn commit/rollback triggers are not removed, because they are > still used by applier and Lua box.on_commit/on_rollback functions. > > Closes #4364 > Closes #4365 lgtm -- Konstantin Osipov, Moscow, Russia