[PATCH 00/13] Incorporate tuple comparison hints into Vinyl

Vladimir Davydov vdavydov.dev at gmail.com
Tue Apr 2 20:33:37 MSK 2019


The goal of this patch set is to build comparison hints into every
subsystem of the Vinyl engine. This is a prerequisite for multikey index
support as we are going to reuse comparison hints to store offsets of
indexed array entries. For conventional indexes, this should speed up
all tuple comparisons, similarly to how it was done in case of the memtx
tree index.

The patch set starts from base subsystems such as the memory level or
page index, and then gradually pushes hints to upper levels. The final
patch of the series isn't just about Vinyl - it removes un-hinted
comparators altogether leaving only hinted versions (the caller is
supposed to pass HINT_NONE if there's no hint). This seems reasonable,
because by the time it is applied, all hot paths have been patched to
use hinted comparators.

Although the patches are quite bulky, they are pretty straightforward
and unsophisticated - they just add hints to tuples where appropriate.

https://github.com/tarantool/tarantool/commits/dv/vy-hints

Vladimir Davydov (13):
  vinyl: store tuple comparison hints in memory tree
  vinyl: store tuple comparison hints in cache tree
  vinyl: store tuple comparison hints in tx write set
  vinyl: store tuple comparison hints in tx read set
  vinyl: store tuple comparison hints in range tree
  vinyl: store tuple comparison hints in page index
  vinyl: propagate tuple comparison hints to read iterator
  vinyl: propagate tuple comparison hints to write iterator
  vinyl: forward tuple comparison hints to memory tree
  vinyl: forward tuple comparison hints to cache tree
  vinyl: forward tuple comparison hints to read iterator
  vinyl: forward tuple comparison hints to tx read set
  Make tuple comparison hints mandatory

 src/box/key_def.c               |   5 +-
 src/box/key_def.h               |  80 +++----------
 src/box/memtx_hash.c            |   6 +-
 src/box/memtx_space.c           |   4 +-
 src/box/memtx_tree.c            |  27 ++---
 src/box/space.c                 |   3 +-
 src/box/sql/analyze.c           |   5 +-
 src/box/tuple_compare.cc        | 179 +++++++----------------------
 src/box/vinyl.c                 | 140 ++++++++++++++---------
 src/box/vy_cache.c              | 131 ++++++++++++---------
 src/box/vy_cache.h              |  52 ++++++---
 src/box/vy_history.c            |   9 +-
 src/box/vy_history.h            |  15 ++-
 src/box/vy_lsm.c                |  88 ++++++++++-----
 src/box/vy_lsm.h                |  13 ++-
 src/box/vy_mem.c                | 235 +++++++++++++++++++++-----------------
 src/box/vy_mem.h                |  77 +++++++++----
 src/box/vy_point_lookup.c       |  71 ++++++------
 src/box/vy_point_lookup.h       |   6 +-
 src/box/vy_range.c              |  42 ++++---
 src/box/vy_range.h              |  31 +++--
 src/box/vy_read_iterator.c      | 209 +++++++++++++++++++++-------------
 src/box/vy_read_iterator.h      |  21 +++-
 src/box/vy_read_set.c           |  19 ++--
 src/box/vy_read_set.h           |  10 +-
 src/box/vy_run.c                | 244 ++++++++++++++++++++++++++--------------
 src/box/vy_run.h                |  28 +++--
 src/box/vy_scheduler.c          |   9 +-
 src/box/vy_stmt.h               |  40 +++++--
 src/box/vy_stmt_stream.h        |   4 +-
 src/box/vy_tx.c                 | 122 ++++++++++++--------
 src/box/vy_tx.h                 |  25 ++--
 src/box/vy_upsert.c             |   3 +-
 src/box/vy_write_iterator.c     |  82 ++++++++++----
 test/unit/vy_cache.c            |  12 +-
 test/unit/vy_iterators_helper.c |  16 ++-
 test/unit/vy_mem.c              |  35 +++---
 test/unit/vy_point_lookup.c     |  16 ++-
 test/unit/vy_write_iterator.c   |   3 +-
 test/vinyl/cache.result         |   6 +-
 test/vinyl/stat.result          |  26 ++---
 41 files changed, 1263 insertions(+), 886 deletions(-)

-- 
2.11.0




More information about the Tarantool-patches mailing list