From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladimir Davydov Subject: [PATCH v2 0/7] Incorporate tuple comparison hints into Vinyl Date: Sat, 6 Apr 2019 23:01:47 +0300 Message-Id: To: tarantool-patches@freelists.org List-ID: 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. https://github.com/tarantool/tarantool/commits/dv/vy-hints Changes in v2: - Rather than passing hint_t as a separate argument, which is error prone and bulky, introduce vy_entry struct storing a statement with its hint and pass it around by value, as suggested by Kostja. - Squash all patches adding comparison hints in one since with the new approach patching subsystems one by one would be too tedious. - Rename vy_cache_entry to vy_cache_node so as not to confuse it with vy_entry. - Factor out a few preparatory patches doing renames and moving pieces of code around. - Move hint_t from key_def.h to tuple_compare.h to reduce dependencies, as suggested by Kostja. - Drop (temporarily) patch killing un-hinted versions of comparators, because it isn't directly connected with this task and hence better be submitted separately. v1: https://www.freelists.org/post/tarantool-patches/PATCH-0013-Incorporate-tuple-comparison-hints-into-Vinyl Vladimir Davydov (7): Move hint_t definition to tuple_compare.h vinyl: rename vy_cache_entry to vy_cache_node vinyl: rename tree_mem_key to vy_mem_tree_key vinyl: zap vy_mem_iterator_curr_stmt helper vinyl: add wrapper around vy_tx_set vinyl: prepare for storing hints in vinyl data structures vinyl: incorporate tuple comparison hints into vinyl data structures src/box/key_def.h | 39 ++-- src/box/tuple_compare.cc | 11 + src/box/tuple_compare.h | 23 ++ src/box/vinyl.c | 317 +++++++++++++++---------- src/box/vy_cache.c | 503 ++++++++++++++++++++-------------------- src/box/vy_cache.h | 58 ++--- src/box/vy_entry.h | 79 +++++++ src/box/vy_history.c | 42 ++-- src/box/vy_history.h | 25 +- src/box/vy_lsm.c | 239 ++++++++++--------- src/box/vy_lsm.h | 17 +- src/box/vy_mem.c | 221 +++++++++--------- src/box/vy_mem.h | 60 +++-- src/box/vy_point_lookup.c | 44 ++-- src/box/vy_point_lookup.h | 7 +- src/box/vy_range.c | 75 +++--- src/box/vy_range.h | 14 +- src/box/vy_read_iterator.c | 240 +++++++++---------- src/box/vy_read_iterator.h | 17 +- src/box/vy_read_set.c | 32 +-- src/box/vy_read_set.h | 13 +- src/box/vy_run.c | 396 ++++++++++++++++--------------- src/box/vy_run.h | 37 +-- src/box/vy_scheduler.c | 17 +- src/box/vy_stmt.h | 113 +++++++++ src/box/vy_stmt_stream.h | 4 +- src/box/vy_tx.c | 255 ++++++++++---------- src/box/vy_tx.h | 39 ++-- src/box/vy_upsert.h | 16 +- src/box/vy_write_iterator.c | 280 +++++++++++----------- test/unit/vy_cache.c | 19 +- test/unit/vy_iterators_helper.c | 93 ++++---- test/unit/vy_iterators_helper.h | 14 +- test/unit/vy_mem.c | 76 +++--- test/unit/vy_point_lookup.c | 33 +-- test/unit/vy_write_iterator.c | 15 +- test/vinyl/cache.result | 6 +- test/vinyl/stat.result | 26 +-- 38 files changed, 1950 insertions(+), 1565 deletions(-) create mode 100644 src/box/vy_entry.h -- 2.11.0