Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH 0/2] Re-implement rowid generation for ephemeral spaces
@ 2018-10-29 19:02 Nikita Pettik
  2018-10-29 19:02 ` [tarantool-patches] [PATCH 1/2] space: add method to fetch next rowid Nikita Pettik
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Nikita Pettik @ 2018-10-29 19:02 UTC (permalink / raw)
  To: tarantool-patches; +Cc: v.shpilevoy, Nikita Pettik

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-11-21 18:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-29 19:02 [tarantool-patches] [PATCH 0/2] Re-implement rowid generation for ephemeral spaces Nikita Pettik
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

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