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 6D5A26EC55; Tue, 15 Jun 2021 21:08:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6D5A26EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1623780518; bh=knYMrInLVs4D96eFI703LhPjbVehRdpisejlQGaVGQY=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=fTAld31LEdaW2fQ3Gh7Tg0EuMA3NjQ66jec1F0Od+jeaKpAIvoQWSKoNLLVGbhPns Wau4uRjChvM6DruTHjKV7OIkzbIz4vYKiZVnyA6dq+CQwNeBjgVTiEQJxFlPIOxSi4 2QOT4S0u7fkaKCKTK2IZrRNlF8xVhX9YsCLQoE7Y= Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 79EEA6EC55 for ; Tue, 15 Jun 2021 21:08:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 79EEA6EC55 Received: by mail-lj1-f176.google.com with SMTP id k8so9393382lja.4 for ; Tue, 15 Jun 2021 11:08:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3DSp5mWC0WR4djD+2KAiJ8AZgGI1tBYNMphdSoVr9HU=; b=un3QFEE/sxxFlNQbcE2+9lvmKGvg3BjU99toI9HDJ8g+XR2s34HV94V951xdzEKu3T ZJkrU1dUlRM8QBpLD53gBC8XEDy8Z6oJlft9GpVRnC7udXQKA/bqp2Ycc1/qlzc07ikg cigtA0pENSl1yhEIa9X8JnuO/spSIjjzJZ1w4Lwnzol7iBfeGF22mTnI4HeXAJcxUzt2 9ND3KOjg79/b8JYdCy11TAwqD4eOWfOg3ZHdIw8MKVdamybihUxzfu5rYeaMF67FpViA JmiFlPjqdzLQbPAdBpfUUaYrfRw/ZphVbUe/7LWIqjVZaCGNID5J9cKfZJvLa3iWhY4s U8UA== X-Gm-Message-State: AOAM532OZLUohZ/nVXupwAII+ptEsEdBJ1O6u7o0SVsHpbw79dfaob2n 7kFmLoc4L6T2JwbCVJGcLeX+8tRKnoc= X-Google-Smtp-Source: ABdhPJwb9kuKSz4yVWzX24PITK9U8OgQ0jhvpfzIwVcSeuK6Fh3r8Weft5GPEIDwukbEpcvBBbmjqQ== X-Received: by 2002:a2e:97ce:: with SMTP id m14mr796737ljj.146.1623780515383; Tue, 15 Jun 2021 11:08:35 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id f9sm228204lft.63.2021.06.15.11.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jun 2021 11:08:34 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id A0C175A002A; Tue, 15 Jun 2021 21:08:33 +0300 (MSK) Date: Tue, 15 Jun 2021 21:08:33 +0300 To: tml Message-ID: References: <20210615135630.63465-1-gorcunov@gmail.com> <20210615135630.63465-2-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.7 (2021-05-04) 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: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Tue, Jun 15, 2021 at 08:02:59PM +0300, Cyrill Gorcunov wrote: > 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. > > > > +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? > --- I force pushed an update.