From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladislav Shpilevoy Subject: [PATCH 0/3] Make heap API more friendly Date: Fri, 22 Feb 2019 14:38:57 +0300 Message-Id: To: tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com List-ID: This patchset fixes some flaws in the salad heap API. First of all, fixed the most irritating thing - a necessity to constantly call constainer_of in the code because of heap's inability to cope with user-defined structures. Secondly, fixed a hole in encapsulation of heap_node structure, which was expluatated by vinyl. Thirdly, fixed heap reserve behaviour, which was not really reserve(), but rather twice(). Branch: http://github.com/tarantool/tarantool/tree/gerold103/heap-friendly-api Vladislav Shpilevoy (3): salad: make heap struct more friendly to use salad: do not touch struct heap_node.pos in user's code salad: fix heap reserve() behaviour src/box/vy_lsm.c | 21 +++--- src/box/vy_range.c | 2 +- src/box/vy_range.h | 8 +- src/box/vy_scheduler.c | 88 +++++++++------------- src/box/vy_write_iterator.c | 49 ++++++------ src/lib/salad/heap.h | 144 ++++++++++++++++++++++++------------ test/unit/heap.c | 76 ++++++++----------- test/unit/heap_iterator.c | 67 +++++++---------- 8 files changed, 220 insertions(+), 235 deletions(-) -- 2.17.2 (Apple Git-113)