Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: v.shpilevoy@tarantool.org, Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] [PATCH 0/2] Re-implement rowid generation for ephemeral spaces
Date: Mon, 29 Oct 2018 22:02:04 +0300	[thread overview]
Message-ID: <cover.1540838910.git.korablev@tarantool.org> (raw)

Branch: https://github.com/tarantool/tarantool/tree/np/gh-3297-ephemeral-rowid
Issue: https://github.com/tarantool/tarantool/issues/3297

This patch-set fixes incorrect rowid generation for ephemeral spaces.
To achieve this, we introduce separate method in space's vtab,
which currently available only for memtx engine (as well as ephemeral
spaces). It simply increments built-in counter and returs new rowid.
It allows us to get rid of calling index_max() which obviously was
wrong way at calcucaling next id (since rowid field is taken to be
last in stored tuples).

Nikita Pettik (2):
  space: add method to fetch next rowid
  sql: use vtab::rowid_next() instead of index_max()

 src/box/blackhole.c                           |  1 +
 src/box/errcode.h                             |  2 ++
 src/box/memtx_space.c                         | 17 ++++++++++++
 src/box/memtx_space.h                         |  7 +++++
 src/box/space.c                               |  9 +++++++
 src/box/space.h                               |  3 +++
 src/box/sql.c                                 | 28 +------------------
 src/box/sql/insert.c                          | 17 +++---------
 src/box/sql/select.c                          | 12 ++++-----
 src/box/sql/tarantoolInt.h                    | 13 ---------
 src/box/sql/vdbe.c                            | 39 +++++++++++++++++----------
 src/box/sysview.c                             |  1 +
 src/box/vinyl.c                               |  1 +
 src/errinj.h                                  |  1 +
 test/box/errinj.result                        |  2 ++
 test/box/misc.result                          |  1 +
 test/sql-tap/gh-3297-ephemeral-rowid.test.lua | 30 +++++++++++++++++++++
 test/sql/errinj.result                        | 15 +++++++++++
 test/sql/errinj.test.lua                      |  7 +++++
 19 files changed, 132 insertions(+), 74 deletions(-)
 create mode 100755 test/sql-tap/gh-3297-ephemeral-rowid.test.lua

-- 
2.15.1

             reply	other threads:[~2018-10-29 19:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29 19:02 Nikita Pettik [this message]
2018-10-29 19:02 ` [tarantool-patches] [PATCH 1/2] space: add method to fetch next rowid Nikita Pettik
2018-10-30  8:45   ` Vladimir Davydov
2018-10-30 10:32     ` n.pettik
2018-11-09  9:25   ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-11 23:16     ` n.pettik
2018-11-11 23:22       ` Vladislav Shpilevoy
2018-11-14 23:11         ` n.pettik
2018-11-21 18:58       ` Konstantin Osipov
2018-10-29 19:02 ` [tarantool-patches] [PATCH 2/2] sql: use vtab::rowid_next() instead of index_max() Nikita Pettik
2018-11-09  9:25   ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-15  4:54 ` [tarantool-patches] Re: [PATCH 0/2] Re-implement rowid generation for ephemeral spaces Kirill Yukhin

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=cover.1540838910.git.korablev@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [tarantool-patches] [PATCH 0/2] Re-implement rowid generation for ephemeral spaces' \
    /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