Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Konstantin Osipov <kostja@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [tarantool-patches] Re: [PATCH 3/6] vinyl: cache iterator: consolidate curr_stmt updates
Date: Thu, 28 Mar 2019 17:47:48 +0300	[thread overview]
Message-ID: <20190328144748.svwojwsniq7q66l6@esperanza> (raw)
In-Reply-To: <20190328142948.GC23295@chai>

On Thu, Mar 28, 2019 at 05:29:48PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev@gmail.com> [19/03/26 18:56]:
> > Currently, vy_cache_iterator->curr_stmt is updated by top-level iterator
> > functions - next, skip, restore - which results in code duplication and
> > spreads core logic among multiple places. To reduce the amount of code
> > and make it generally easier to follow, this patch moves the updates to
> > low level functions - step, seek. It also makes the seek method return
> > the stop flag, which makes it similar to step, thus making the code more
> > consistent.
> 
> OK to push. As a nit, I would pass stop as an out parameter, not
> in return value. We may want to use the return value to indicate
> an error sometime.

Hmm, I just wanted to make it look like vy_cache_iterator_step,
but I guess you're right - we'd better avoid using retval as stop
indicator. I'll either amend this patch or prepare a separate patch
to clean up retvals across all iterators.

  reply	other threads:[~2019-03-28 14:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26 15:50 [PATCH 0/6] vinyl: iterator cleanup Vladimir Davydov
2019-03-26 15:50 ` [PATCH 1/6] vinyl: txw iterator: fold eq check in seek method Vladimir Davydov
2019-03-28 14:25   ` [tarantool-patches] " Konstantin Osipov
2019-03-26 15:50 ` [PATCH 2/6] vinyl: cache " Vladimir Davydov
2019-03-28 14:27   ` [tarantool-patches] " Konstantin Osipov
2019-03-26 15:50 ` [PATCH 3/6] vinyl: cache iterator: consolidate curr_stmt updates Vladimir Davydov
2019-03-28 14:29   ` [tarantool-patches] " Konstantin Osipov
2019-03-28 14:47     ` Vladimir Davydov [this message]
2019-03-26 15:50 ` [PATCH 4/6] vinyl: run iterator: zap search_ended flag Vladimir Davydov
2019-03-28 14:35   ` [tarantool-patches] " Konstantin Osipov
2019-03-28 14:50     ` Vladimir Davydov
2019-03-26 15:50 ` [PATCH 5/6] vinyl: run iterator: refactor seek method Vladimir Davydov
2019-03-28 14:39   ` [tarantool-patches] " Konstantin Osipov
2019-03-28 14:58     ` Vladimir Davydov
2019-03-26 15:50 ` [PATCH 6/6] vinyl: simplify read iterator restoration behavior Vladimir Davydov
2019-03-28 14:47   ` [tarantool-patches] " Konstantin Osipov
2019-03-28 16:28 ` [PATCH 0/6] vinyl: iterator cleanup Vladimir Davydov

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=20190328144748.svwojwsniq7q66l6@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] Re: [PATCH 3/6] vinyl: cache iterator: consolidate curr_stmt updates' \
    /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