[tarantool-patches] [PATCH 0/2] Re-implement rowid generation for ephemeral spaces
Nikita Pettik
korablev at tarantool.org
Mon Oct 29 22:02:04 MSK 2018
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
More information about the Tarantool-patches
mailing list