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 C762F25243 for ; Wed, 24 Jul 2019 19:19:53 -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 hx15pqlqAE7b for ; Wed, 24 Jul 2019 19:19:53 -0400 (EDT) Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [94.100.177.96]) (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 85DCC252F2 for ; Wed, 24 Jul 2019 19:19:53 -0400 (EDT) Received: by smtp36.i.mail.ru with esmtpa (envelope-from ) id 1hqQY3-00053X-T5 for tarantool-patches@freelists.org; Thu, 25 Jul 2019 02:19:52 +0300 Date: Thu, 25 Jul 2019 02:19:51 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 3/4] txn: use savepoints to roll back statements on yield or error Message-ID: <20190724231951.GF15185@atlas> References: <20190724225505.GC14292@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190724225505.GC14292@atlas> 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 * Konstantin Osipov [19/07/25 01:59]: > * Vladimir Davydov [19/07/19 21:09]: > > Currently, txn_savepoint objects are only used for savepoints created by > > the user while internally we use stailq_entry instead. This is okay now, > > because txn_savepoint is equivalent to a stailq_entry in most cases, but > > in order to properly deal with commit/rollback triggers, we will need to > > maintain extra information in each savepoint. So this patch makes txn > > use txn_savepoint for internal needs. > > > > Note that this patch increases txn::sub_stmt_begin array size by 1, > > because we could actually write beyond the array bounds - it didn't > > lead to any problems before, because it only overwrote txn::signature. > > With the increased array entry size, it can overwrite more vital parts > > of the txn struct. > > Please add a fix for txn->signature overwrite to 1.10 in a separate patch, > this part is LGTM. As to other parts, I don't understand the commit comment to begin with. Can there be a DDL in a sub-statement? What is the point of having a full blown savepoint for sub-statement boundaries? -- Konstantin Osipov, Moscow, Russia