From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 7 Mar 2019 13:38:43 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH v2 3/3] Transaction support for applier Message-ID: <20190307103843.lla36g2qwmd3pyay@esperanza> References: <9fca821d3c43ee5ee928a0ca800d6bd0823cfd06.1551902962.git.georgy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9fca821d3c43ee5ee928a0ca800d6bd0823cfd06.1551902962.git.georgy@tarantool.org> To: Georgy Kirichenko Cc: tarantool-patches@freelists.org List-ID: On Wed, Mar 06, 2019 at 11:16:18PM +0300, Georgy Kirichenko wrote: > Applier fetch incoming rows to form a transaction and then apply it. > Rows are fetched and stored on fiber gc region until last transaction row > with is_commit was fetched. After fetch a multi row transaction is going to be > applied into txn_begin/txn_commit/txn_rolback boundaries. At this time > we could not apply single row transaction in such boundaries because of > ddl which does not support non auto commit transactions. > > Closes: #2798 > Needed for: #980 > --- > src/box/applier.cc | 211 ++++++++++++++++------ > test/replication/transaction.result | 240 ++++++++++++++++++++++++++ > test/replication/transaction.test.lua | 86 +++++++++ > 3 files changed, 482 insertions(+), 55 deletions(-) > create mode 100644 test/replication/transaction.result > create mode 100644 test/replication/transaction.test.lua > > diff --git a/src/box/applier.cc b/src/box/applier.cc > index a687d2bea..f0a779aa7 100644 > --- a/src/box/applier.cc > +++ b/src/box/applier.cc > @@ -429,6 +429,146 @@ applier_join(struct applier *applier) > applier_set_state(applier, APPLIER_READY); > } > > +/** > + * Helper struct to bind rows in a list. > + */ > +struct xrow_header_item { I like that you now use a list instead of a dynamically growing array for storing rows. This spares us from the necessity of implementing region_realloc. Don't like the name though. What about applier_tx_stmt? > + struct stailq_entry next; > + struct xrow_header row; > +}; Please add comments to struct members. Also, it doesn't seem that you have addressed all my previous comments. Please go through them once again.