From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Georgy Kirichenko <georgy@tarantool.org>
Subject: Re: [tarantool-patches] Re: [PATCH v2 1/2] Journal transaction boundaries
Date: Mon, 28 Jan 2019 16:08:45 +0300 [thread overview]
Message-ID: <8186e902-fdeb-c4e3-1b32-80bbe088d2f2@tarantool.org> (raw)
In-Reply-To: <20190128130053.ss7bytgv72l3aeca@esperanza>
On 28/01/2019 16:00, Vladimir Davydov wrote:
> On Tue, Jan 22, 2019 at 01:57:36PM +0300, Georgy Kirichenko wrote:
>> Append txn_id, txn_replica_id and txn_last to xrow_header structure.
>> txn_replica_id identifies replica where transaction was started and
>> txn_id identifies transaction id on that replica. As transaction id
>> a lsn of the first row in this transaction is used.
>> txn_last set to true if it is the last row in a transaction, so we
>> could commit transaction with last row or use additional NOP requests
>> with txn_last = true ans valid txn_id and txn_replica_id.
>> For replication all local changes moved to xrows array tail to form
>> a separate transaction (like autonomous transaction) because it is not
>> possible to replicate such transaction back to it's creator.
>>
>> As encoding/deconding rules assumed:
>> 1. txn_replica_id is encoded only if it is not equal with replica
>> id. This might have point because of replication trigger
>> 2. txn_id and txn_last are encoded only for multi-row transaction.
>> So if we do not have txn_id in a xstream then this means that it
>> is a single row transaction.
>> This rules provides compatibility with previous xlog handling.
>>
>> Needed for: 2798
>> ---
>> src/box/iproto_constants.h | 3 ++
>> src/box/wal.c | 36 +++++++++++++++-
>> src/box/xrow.c | 38 +++++++++++++++++
>> src/box/xrow.h | 5 ++-
>> test/unit/xrow.cc | 3 ++
>> test/vinyl/errinj_stat.result | 8 ++--
>> test/vinyl/layout.result | 24 +++++------
>> test/vinyl/stat.result | 78 +++++++++++++++++------------------
>
> Also, forgot to say that this patch lacks a test case. We should
> probably check that transaction boundaries are written using the
> xlog reader module.
>
I have a test in my old branch on this issue. You can find it either
in the branches list, or in the issue GitHub webpage, because I referred
to it in the commit.
next prev parent reply other threads:[~2019-01-28 13:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 10:57 [tarantool-patches] [PATCH v2 0/2] Transaction boundaries in replication protocol Georgy Kirichenko
2019-01-22 10:57 ` [tarantool-patches] [PATCH v2 1/2] Journal transaction boundaries Georgy Kirichenko
2019-01-28 12:58 ` Vladimir Davydov
2019-01-29 10:09 ` Георгий Кириченко
2019-01-29 11:00 ` Vladimir Davydov
2019-01-31 7:34 ` Георгий Кириченко
2019-01-31 8:19 ` Vladimir Davydov
2019-01-31 14:25 ` Георгий Кириченко
2019-01-31 14:54 ` Vladimir Davydov
2019-02-01 9:31 ` Георгий Кириченко
2019-01-28 13:00 ` Vladimir Davydov
2019-01-28 13:08 ` Vladislav Shpilevoy [this message]
2019-02-08 16:56 ` [tarantool-patches] " Konstantin Osipov
2019-01-22 10:57 ` [tarantool-patches] [PATCH v2 2/2] Transaction support for applier Georgy Kirichenko
2019-01-28 13:35 ` 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=8186e902-fdeb-c4e3-1b32-80bbe088d2f2@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=georgy@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [tarantool-patches] Re: [PATCH v2 1/2] Journal transaction boundaries' \
/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