From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Georgy Kirichenko <georgy@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [tarantool-patches] [PATCH v5 1/2] Journal transaction boundaries
Date: Thu, 21 Feb 2019 19:25:38 +0300 [thread overview]
Message-ID: <20190221162538.abjxykyv3xszujb4@esperanza> (raw)
In-Reply-To: <11df785115d046a43de09476e51302a00b1f3486.1550762885.git.georgy@tarantool.org>
On Thu, Feb 21, 2019 at 06:29:16PM +0300, Georgy Kirichenko wrote:
> Append txn_id and is_commit to xrow_header structure, txn_id identifies
> transaction id on replica where transaction was started. As transaction id
> a lsn of the first row in the transaction is used. is_commit is set to true
> for the last row in a transaction.
>
> As encoding/deconding rule assumed:
> * txn_id encoded using transaction sequence number iproto field
> as IPROTO_TSN = lsn - txn_id,
> * is_commit packed into IPROTO_FLAGS field with a bit mask,
> * txn_id and is_commit are encoded only for multi-row transactions.
> So if we do not have txn_id after row decoding then this means that it
> is a single row transaction.
>
> These rules provide compatibility with previous xlog format as well
> as good compaction level.
>
> Needed for: 2798
> ---
> src/box/iproto_constants.c | 8 +--
> src/box/iproto_constants.h | 7 +++
> src/box/lua/xlog.c | 10 +++
> src/box/wal.c | 5 ++
> src/box/xrow.c | 41 +++++++++++++
> src/box/xrow.h | 4 +-
> test/unit/xrow.cc | 2 +
> test/xlog/transaction.result | 108 +++++++++++++++++++++++++++++++++
> test/xlog/transaction.test.lua | 46 ++++++++++++++
> 9 files changed, 226 insertions(+), 5 deletions(-)
> create mode 100644 test/xlog/transaction.result
> create mode 100644 test/xlog/transaction.test.lua
Pushed this one to 2.1.
next prev parent reply other threads:[~2019-02-21 16:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1550762885.git.georgy@tarantool.org>
2019-02-21 15:29 ` Georgy Kirichenko
2019-02-21 16:25 ` Vladimir Davydov [this message]
2019-02-21 15:29 ` [tarantool-patches] [PATCH v5 2/2] Transaction support for applier Georgy Kirichenko
2019-03-01 9:50 ` 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=20190221162538.abjxykyv3xszujb4@esperanza \
--to=vdavydov.dev@gmail.com \
--cc=georgy@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [tarantool-patches] [PATCH v5 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