From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 23 May 2019 18:25:44 +0300 From: Konstantin Osipov Subject: Re: [tarantool-patches] [PATCH v2] memtx: add yields during index build Message-ID: <20190523152544.GA17820@atlas> References: <20190523141111.14885-1-sergepetrenko@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190523141111.14885-1-sergepetrenko@tarantool.org> To: tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com, Serge Petrenko List-ID: * Serge Petrenko [19/05/23 17:58]: > Memtx index build used to stall event loop for all the build period. > Add occasional yields so that the loop is not blocked for too long. > Also make index build set on_replace triggers so that concurrent > replaces are also correctly handled during the build. > > Closes #3976 The next piece of the puzzle is we need to understand how this replicates. What would be the order of such a concurrent execution on replica? I'd assume it would stop the applier until the build is finished, is this right, Georgy? I think this is the only reasonable and safe thing to do, do you have other opinions? If no, we just need to test it with some timeout injections on replica, in particular add a test which breaks replication by inserting a conflicting row while the index is being built. This test would be useful for both engines, I guess. -- Konstantin Osipov, Moscow, Russia