From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 6343A6EC55; Wed, 16 Jun 2021 11:16:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6343A6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1623831367; bh=zb1nNu19XaUdBbjrzV47u68uoiC98y/rmK3x5LxDCFE=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=OTO8gjoS68uEZwFxoN85iol7WSN6iDlyc7S7mYjf5XRLkJ0j1VqCoRslTpHzIBz09 D3tgDySfHdpX1vIxaqyOp8LDzYKlPPbLOmGvWfIHKumjyXp3H/Z0htBR6k87BBHcQp pyLAaGkSnVvKglECr9thv3ZS7w/9BbufGpunsFFM= Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [94.100.177.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id E29A16EC55 for ; Wed, 16 Jun 2021 11:16:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E29A16EC55 Received: by smtp32.i.mail.ru with esmtpa (envelope-from ) id 1ltQiT-0008C1-1l; Wed, 16 Jun 2021 11:16:05 +0300 To: Cyrill Gorcunov Cc: tml , Vladislav Shpilevoy References: <20210615135630.63465-1-gorcunov@gmail.com> <20210615135630.63465-2-gorcunov@gmail.com> Message-ID: Date: Wed, 16 Jun 2021 11:16:04 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: ru X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9D5B0DA836B685C54907A7AE9C1BA82BC67C1327DFB87C6A6182A05F538085040965F61EBEA0D27902272FBAA3105EADB18FF0F15E23FC12B030F0C1BD852A64A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76042E2DB3E33BF2BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637D636C6B786B38B6A8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D88E47E47A3FEA2225EF1861E8048EDDB4117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3A703B70628EAD7BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751F28451B159A507268D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE7B96B19DC40933219935A1E27F592749D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3A6C7FFFE744CA7FB03F1AB874ED89028C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637BC468E7E89D8C5D6EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24209795067102C07E8F7B195E1C9783128A16E2BC91C773B92A11B906A78501B X-C1DE0DAB: 0D63561A33F958A55063E4BB5665BAD1767F464F47D74EEE8C380F2F00534C61D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3441661D6226BE8C3146E06042D15CBE83BB228BF97CE5735E48F747A804812D3C043F81D4A84536FC1D7E09C32AA3244C0A741DEAA120BEE9F7E0230ED99A2C63250262A5EE9971B0FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojzTTns/+yd+bPCvcXA22/xg== X-Mailru-Sender: 583F1D7ACE8F49BD9DF7A8DAE6E2B08A3946571AAF48C37FB03D4F60ABB362FCD978028B18D5C9A7424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v9 1/1] applier: filter incoming synchro packets via transaction initiator X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 15.06.2021 20:02, Cyrill Gorcunov пишет: > On Tue, Jun 15, 2021 at 05:26:06PM +0300, Serge Petrenko wrote: >>> +box.space.sync:select{} >>> + | --- >>> + | - - [1] >>> + | ... >> You need to wait for the space creation, just like >> you do below. Otherwise the test'll be flaky. >> Also, please see a comment regarding wait_lsn vs wait_cond >> below. > As being discussed due to quorum=2 and sync space we don't need > to wait. Yes, indeed. I missed that. >>> +test_run:wait_cond(function() return \ >>> + box.space.sync ~= nil and \ >>> + box.space.sync:get{1} ~= nil and \ >>> + box.space.sync:get{1}[1] == 1 end, 100) >>> + | --- >>> + | - true >>> + | ... >> I suggest you use wait_lsn('replica2', 'master') here >> instead of this bulky wait_cond. >> First of all, it takes a single line, instead of 4 lines. >> >> Secondly, you forgot to test `box.space.sync.index.pk ~= nil`, meaning >> the test will still fail occasionally, when index creation doesn't replicate >> in time. > You mean something like below? > --- > diff --git a/test/replication/gh-6035-applier-filter.result b/test/replication/gh-6035-applier-filter.result > index 2620e7b6f..7345a19f7 100644 > --- a/test/replication/gh-6035-applier-filter.result > +++ b/test/replication/gh-6035-applier-filter.result > @@ -102,12 +102,8 @@ test_run:switch('replica2') > | --- > | - true > | ... > -test_run:wait_cond(function() return \ > - box.space.sync ~= nil and \ > - box.space.sync:get{1} ~= nil and \ > - box.space.sync:get{1}[1] == 1 end, 100) > +test_run:wait_lsn('replica2', 'master') > | --- > - | - true > | ... > box.space.sync:select{} > | --- > diff --git a/test/replication/gh-6035-applier-filter.test.lua b/test/replication/gh-6035-applier-filter.test.lua > index 9bfd91288..beca5258e 100644 > --- a/test/replication/gh-6035-applier-filter.test.lua > +++ b/test/replication/gh-6035-applier-filter.test.lua > @@ -53,10 +53,7 @@ box.space.sync:select{} > -- And the second hop is replica2 where > -- replica1 replicated the data to us. > test_run:switch('replica2') > -test_run:wait_cond(function() return \ > - box.space.sync ~= nil and \ > - box.space.sync:get{1} ~= nil and \ > - box.space.sync:get{1}[1] == 1 end, 100) > +test_run:wait_lsn('replica2', 'master') > box.space.sync:select{} > > test_run:switch('default') Exactly. -- Serge Petrenko