Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org
Cc: vdavydov.dev@gmail.com
Subject: [PATCH 0/3] Make heap API more friendly
Date: Fri, 22 Feb 2019 14:38:57 +0300	[thread overview]
Message-ID: <cover.1550835301.git.v.shpilevoy@tarantool.org> (raw)

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)

             reply	other threads:[~2019-02-22 11:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 11:38 Vladislav Shpilevoy [this message]
2019-02-22 11:38 ` [PATCH 1/3] salad: make heap struct more friendly to use Vladislav Shpilevoy
2019-02-22 18:26   ` [tarantool-patches] " Konstantin Osipov
2019-02-22 18:38     ` [tarantool-patches] " Vladislav Shpilevoy
2019-02-22 11:38 ` [PATCH 2/3] salad: do not touch struct heap_node.pos in user's code Vladislav Shpilevoy
2019-02-25 12:46   ` Vladimir Davydov
2019-02-22 11:39 ` [PATCH 3/3] salad: fix heap reserve() behaviour Vladislav Shpilevoy
2019-02-22 18:31   ` [tarantool-patches] " Konstantin Osipov
2019-02-22 18:38     ` [tarantool-patches] " Vladislav Shpilevoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1550835301.git.v.shpilevoy@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [PATCH 0/3] Make heap API more friendly' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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