Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Konstantin Osipov <kostja@tarantool.org>
Cc: tarantool-patches@freelists.org,
	Georgy Kirichenko <georgy@tarantool.org>
Subject: Re: [tarantool-patches] Re: [PATCH 3/3] Transaction support for applier
Date: Tue, 5 Mar 2019 13:28:56 +0300	[thread overview]
Message-ID: <20190305102856.3isddnlhd3vzvwtb@esperanza> (raw)
In-Reply-To: <20190305091135.GY21955@chai>

On Tue, Mar 05, 2019 at 12:11:35PM +0300, Konstantin Osipov wrote:
> * Georgy Kirichenko <georgy@tarantool.org> [19/03/03 23:30]:
> > Applier fetch incoming rows to form a transaction and then apply it.
> > In case of replication all local changes moved to an journal entry
> > tail to form a separate transaction (like autonomous transaction)
> > to be able to replicate changes back so applier assumes that transactions
> > could not be mixed in a replication stream.
> > 
> > Closes: #2798
> > Needed for: #980
> > ---
> >  src/box/applier.cc                    | 243 ++++++++++++++++++++------
> >  src/box/txn.c                         |  21 ++-
> >  src/box/txn.h                         |   4 +
> >  test/replication/transaction.result   | 240 +++++++++++++++++++++++++
> >  test/replication/transaction.test.lua |  86 +++++++++
> >  5 files changed, 534 insertions(+), 60 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 3222b041d..dfabbe5ab 100644
> > --- a/src/box/applier.cc
> > +++ b/src/box/applier.cc
> > @@ -48,6 +48,12 @@
> >  #include "session.h"
> >  #include "cfg.h"
> >  #include "box.h"
> > +#include "txn.h"
> 
> I thought we agreed to use box API, not txn API? 

I don't think it's a good idea to use any public box API functions, such
as box_txn_begin and box_txn_commit, in internals, because they might
have some fool-proof checks we don't need.

> > +static int
> > +applier_apply_tx(struct xrow_header *first_row, struct xrow_header *last_row)
> > +{
> > +	int res = 0;
> > +	struct txn *txn = NULL;
> > +	struct xrow_header *row = first_row;
> > +	if (first_row != last_row)
> > +		txn = txn_begin(false);
> 
> Shouldn't it be box_txn_begin()?

  reply	other threads:[~2019-03-05 10:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-03 20:26 [tarantool-patches] [PATCH 0/3] Transaction boundaries " Georgy Kirichenko
2019-03-03 20:26 ` [tarantool-patches] [PATCH 1/3] Applier gets rid of a xstream Georgy Kirichenko
2019-03-05  8:52   ` [tarantool-patches] " Konstantin Osipov
2019-03-05 10:19   ` [tarantool-patches] " Vladimir Davydov
2019-03-03 20:26 ` [tarantool-patches] [PATCH 2/3] Merge apply row and apply_initial_join_row Georgy Kirichenko
2019-03-05  9:06   ` [tarantool-patches] " Konstantin Osipov
2019-03-05 10:26   ` [tarantool-patches] " Vladimir Davydov
2019-03-03 20:26 ` [tarantool-patches] [PATCH 3/3] Transaction support for applier Georgy Kirichenko
2019-03-05  9:11   ` [tarantool-patches] " Konstantin Osipov
2019-03-05 10:28     ` Vladimir Davydov [this message]
     [not found]       ` <20190305112333.GA30697@chai>
2019-03-05 11:27         ` Vladimir Davydov
2019-03-05  9:13   ` Konstantin Osipov
2019-03-05  9:25   ` Konstantin Osipov
2019-03-05  9:28   ` Konstantin Osipov
2019-03-05 11:59   ` [tarantool-patches] " Vladimir Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190305102856.3isddnlhd3vzvwtb@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=georgy@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] Re: [PATCH 3/3] Transaction support for applier' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox