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,
	Kirill Shcherbatov <kshcherbatov@tarantool.org>,
	v.shpilevoy@tarantool.org
Subject: Re: [tarantool-patches] Re: [PATCH v5 3/3] box: introduce func_index
Date: Sat, 27 Jul 2019 14:42:48 +0300	[thread overview]
Message-ID: <20190727114248.GB4659@esperanza> (raw)
In-Reply-To: <20190726193130.GC14622@atlas>

On Fri, Jul 26, 2019 at 10:31:30PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev@gmail.com> [19/07/26 13:14]:
> > On Fri, Jul 26, 2019 at 12:57:43PM +0300, Konstantin Osipov wrote:
> > > * Vladimir Davydov <vdavydov.dev@gmail.com> [19/07/26 12:54]:
> > > > 
> > > > There's one thing about _func_index space that keeps bothering me: since
> > > > insertion of a tuple into this space is a yielding operation and this
> > > > operation is executed after insertion of a tuple into _index, we won't
> > > > be able to wrap space.create_index() into box.begin/commit, because only
> > > > the first DDL statement in a transaction is allowed to be yielding.
> > > 
> > > I think we agreed to solve this to build func index at recovery
> > > in _func_index trigger and at create in _func trigger. 
> > 
> > I don't understand how it's connected with recovery. Could you please
> > elaborate?
> > 
> > Just to be clear, I mean the following:
> > 
> > space.create_index():
> >   _index:insert{...}
> >   _func_index:insert{...}
> > 
> > The latter may yield so we can't use box.begin/commit in
> > space.create_index() Lua function.
> 
> It will yield only during recovery. During normal operation I
> thought we're going to build the index ad _index:insert{}

That's not how things currently work AFAICS. Anyway, this means that
we'll have to have some sort of redundancy: func id should be stored
both in _func_index and _index system spaces. Besides, we'll invoke
different code paths on recovery and during normal operation. I see
clearly now that it's by far better than recovering _func space before
_index space. Thanks for clarification.

  reply	other threads:[~2019-07-27 11:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 18:39 [PATCH v5 0/3] box: functional indexes Kirill Shcherbatov
2019-07-25 18:39 ` [PATCH v5 1/3] box: introduce opts.is_multikey function option Kirill Shcherbatov
2019-07-26  9:22   ` Vladimir Davydov
2019-07-26  9:55     ` Konstantin Osipov
2019-07-25 18:39 ` [PATCH v5 2/3] box: introduce tuple_chunk infrastructure Kirill Shcherbatov
2019-07-26  9:35   ` Vladimir Davydov
2019-07-25 18:39 ` [PATCH v5 3/3] box: introduce func_index Kirill Shcherbatov
2019-07-26  9:49   ` Vladimir Davydov
2019-07-26  9:57     ` Konstantin Osipov
2019-07-26 10:10       ` Vladimir Davydov
2019-07-26 19:31         ` [tarantool-patches] " Konstantin Osipov
2019-07-27 11:42           ` Vladimir Davydov [this message]
2019-07-28 21:30             ` Konstantin Osipov
2019-07-26  9:43 [PATCH v5 0/3] box: functional indexes Kirill Shcherbatov
2019-07-26  9:43 ` [PATCH v5 3/3] box: introduce func_index Kirill Shcherbatov
2019-07-26 12:15   ` Vladimir Davydov
2019-07-26 13:58     ` [tarantool-patches] " Kirill Shcherbatov

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=20190727114248.GB4659@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=kostja@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [tarantool-patches] Re: [PATCH v5 3/3] box: introduce func_index' \
    /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