From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 2934A25C94 for ; Fri, 26 Jul 2019 15:31:33 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hjdEVaxhf9Tt for ; Fri, 26 Jul 2019 15:31:33 -0400 (EDT) Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id DDFD025C37 for ; Fri, 26 Jul 2019 15:31:32 -0400 (EDT) Date: Fri, 26 Jul 2019 22:31:30 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v5 3/3] box: introduce func_index Message-ID: <20190726193130.GC14622@atlas> References: <25789ea46e8fcec527bd7864209bb6ea2113dca5.1564079799.git.kshcherbatov@tarantool.org> <20190726094958.GA4080@esperanza> <20190726095743.GG9916@atlas> <20190726101032.GB4080@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190726101032.GB4080@esperanza> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Kirill Shcherbatov , v.shpilevoy@tarantool.org * Vladimir Davydov [19/07/26 13:14]: > On Fri, Jul 26, 2019 at 12:57:43PM +0300, Konstantin Osipov wrote: > > * Vladimir Davydov [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{} -- Konstantin Osipov, Moscow, Russia