Tarantool development patches archive
 help / color / mirror / Atom feed
* [PATCH 0/7] Support multikey indexes in Vinyl
@ 2019-05-08 17:22 Vladimir Davydov
  2019-05-08 17:22 ` [PATCH 1/7] Make tuple comparison hints mandatory Vladimir Davydov
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Vladimir Davydov @ 2019-05-08 17:22 UTC (permalink / raw)
  To: tarantool-patches

A pretty straightforward patch set that implements multikey index
support for Vinyl spaces. The idea is to use vy_entry.hint to store
multikey array entry offsets instead of comparison hints, similarly
to how it is done in memtx. As we have already patched Vinyl to store
statements in vy_entry containers, this patch set is fairly small.

The series is organized as follows.

Patch 1 makes tuple comparison hints mandatory. This allows to remove
quite a bit of code. It shouldn't hurt performance as we use hinted
versions pretty much everywhere these days. This change was approved by
Kostja a while back.

Patches 2-4 add multikey_idx argument to generic functions needed by
Vinyl (key extractor, tuple bloom, field lookup) so that they can be
used with multikey indexes.

Patch 5 teaches Vinyl statement constructors to use tuple_bloom_builder.
This is necessary to support field map extents, which are integral to
multikey indexes.

Patch 6 makes the run writer use entry hints to extract and hash key
parts when dumping statements to disk so that once hints are used to
store multikey offsets it will dump multikey tuples correctly.

Patch 7 completes the series by patching those places in the code where
we insert tuples so that now they iterate over multikey entries and
insert the statement for each multikey occurrence.

https://github.com/tarantool/tarantool/commits/dv/vy-multikey-index

Vladimir Davydov (7):
  Make tuple comparison hints mandatory
  Get rid of tuple_field_by_part_multikey
  Make tuple_extract_key support multikey indexes
  Make tuple_bloom support multikey indexes
  vinyl: use field_map_builder for constructing stmt field map
  vinyl: use multikey hints while writing runs
  vinyl: implement multikey index support

 src/box/index.cc              |   2 +-
 src/box/key_def.c             |   5 +-
 src/box/key_def.h             | 120 +++++-------------
 src/box/lua/key_def.c         |   7 +-
 src/box/memtx_bitset.c        |   6 +-
 src/box/memtx_hash.c          |   7 +-
 src/box/memtx_rtree.c         |   3 +-
 src/box/memtx_space.c         |   6 +-
 src/box/memtx_tree.c          |  41 +++---
 src/box/request.c             |   5 +-
 src/box/space.c               |   5 +-
 src/box/sql.c                 |  10 +-
 src/box/sql/analyze.c         |   5 +-
 src/box/tuple.h               |  29 ++---
 src/box/tuple_bloom.c         |  16 ++-
 src/box/tuple_bloom.h         |   9 +-
 src/box/tuple_compare.cc      | 284 +++++++++++-------------------------------
 src/box/tuple_extract_key.cc  |  58 ++++++---
 src/box/tuple_hash.cc         |  19 +--
 src/box/vinyl.c               | 152 ++++++++++++----------
 src/box/vy_range.c            |   3 +-
 src/box/vy_run.c              |  36 +++---
 src/box/vy_stmt.c             |  96 +++++++-------
 src/box/vy_stmt.h             | 136 ++++++++++----------
 src/box/vy_tx.c               |  43 +++++--
 src/box/vy_tx.h               |  19 +--
 src/box/vy_upsert.c           |   3 +-
 test/box/bitset.result        |  15 +++
 test/box/bitset.test.lua      |   6 +
 test/box/hash.result          |  15 +++
 test/box/hash.test.lua        |   6 +
 test/box/rtree_misc.result    |  15 +++
 test/box/rtree_misc.test.lua  |   6 +
 test/engine/engine.cfg        |   3 -
 test/engine/multikey.result   |  40 +-----
 test/engine/multikey.test.lua |  16 +--
 36 files changed, 573 insertions(+), 674 deletions(-)

-- 
2.11.0

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

end of thread, other threads:[~2019-05-13 19:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-08 17:22 [PATCH 0/7] Support multikey indexes in Vinyl Vladimir Davydov
2019-05-08 17:22 ` [PATCH 1/7] Make tuple comparison hints mandatory Vladimir Davydov
2019-05-09  5:58   ` [tarantool-patches] " Konstantin Osipov
2019-05-08 17:22 ` [PATCH 2/7] Get rid of tuple_field_by_part_multikey Vladimir Davydov
2019-05-08 17:22 ` [PATCH 3/7] Make tuple_extract_key support multikey indexes Vladimir Davydov
2019-05-08 17:22 ` [PATCH 4/7] Make tuple_bloom " Vladimir Davydov
2019-05-08 17:22 ` [PATCH 5/7] vinyl: use field_map_builder for constructing stmt field map Vladimir Davydov
2019-05-08 17:22 ` [PATCH 6/7] vinyl: use multikey hints while writing runs Vladimir Davydov
2019-05-08 17:22 ` [PATCH 7/7] vinyl: implement multikey index support Vladimir Davydov
2019-05-13 16:34 ` [PATCH] Use MULTIKEY_NONE instead of -1 Vladimir Davydov
2019-05-13 19:26 ` [PATCH 0/7] Support multikey indexes in Vinyl Vladimir Davydov

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