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 1422C6EC56; Fri, 19 Mar 2021 15:14:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1422C6EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616156091; bh=uylv5LZKkhJ0eD16mGEKqx6V2FPPYdyCkNZqmvQFyRU=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=gwhJvhltLhPsRGfELRNjZHIuoHfgjESUpAlMYY94uO9hL2os0uSKzOUpACN1HKmOZ Qz/zleShmV+ej8o/Pfc4GtNWWJuyZ8jhVTSwN/UFwuiaaJ80FTmW33AAdfrObDDO9k cCfdDMEexJ4Y+82ieWPJJty3thGDLq0hz7KO7ivw= Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (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 1EBC36EC56 for ; Fri, 19 Mar 2021 15:14:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1EBC36EC56 Received: by mail-lf1-f48.google.com with SMTP id 75so9638808lfa.2 for ; Fri, 19 Mar 2021 05:14:50 -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=Wv7piS5zUC0I8HnoiYkNvLBBTDKojEWuv02vodh5n8Y=; b=BeyleQypeWI7YgM39SqssaCc9O83GPSCoLsU5CQ1hMQQhzq4pXCfMQdiq8yvNS7+c3 IT2/1HJtsnKO0lts5rjMULg9QH2zth0w3YXTyfVieWg7PDniUcTSV3+soqVMZTbKeVy4 ko3rPBTT552hkWigu2Zv0YyhZkKewpt1hQ0ofQcCh6BTGv3xdBybfsC4MDYfDyl6+60N /HKbqe+sBu1RsU20SUhXrk7NMtjr2i4MPaXmM/BNkLceGeVc7e7ArnVXnxETXUxaOfnj SXS9ld4IGnhn5RDE52Ei1hxb0PB/LAldy5etYjpnFcBmelWUy4QO3Iw/IPavbyw/EHRf Txuw== X-Gm-Message-State: AOAM531QvQjWfOy/z/dOeIHldBcSjUoF9QBuSbiCxb/Pjla0IGn/0B3Q 4KqtvCnpTwaoY94FVFOezzI= X-Google-Smtp-Source: ABdhPJzmJ3Q1OhydAtkOu0NfpOIRRyyQixh+u+HI+o1iT1WoDWqqvhAfpKBobxnXggZCea3ey1XxEA== X-Received: by 2002:ac2:43d6:: with SMTP id u22mr712241lfl.266.1616156088205; Fri, 19 Mar 2021 05:14:48 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id z13sm599852lfh.144.2021.03.19.05.14.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 05:14:46 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 284B45601CD; Fri, 19 Mar 2021 15:14:46 +0300 (MSK) Date: Fri, 19 Mar 2021 15:14:46 +0300 To: Vladislav Shpilevoy Cc: tml , Mons Anderson Message-ID: References: <20210318184138.1077807-1-gorcunov@gmail.com> <20210318184138.1077807-3-gorcunov@gmail.com> <117fc87c-0317-db58-ea7a-df1325a6829d@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <117fc87c-0317-db58-ea7a-df1325a6829d@tarantool.org> User-Agent: Mutt/2.0.5 (2021-01-21) Subject: Re: [Tarantool-patches] [PATCH 2/2] test: add a test for wal_cleanup_delay option 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Fri, Mar 19, 2021 at 12:04:11AM +0100, Vladislav Shpilevoy wrote: > > + > > +function func_xlog_snap(space, value) > > 1. This fails luacheck (which I don't like having in the tests, > but still we must keep it green): > > Checking test/replication/gh-5806-master.lua 1 warning > > test/replication/gh-5806-master.lua:5:10: (W111) setting non-standard global variable func_xlog_snap > > Checking test/replication/gh-5806-slave.lua 1 warning > > test/replication/gh-5806-slave.lua:5:10: (W111) setting non-standard global variable func_xlog_snap Thanks, Vlad! Actually I don't understand what this warning means. Should I make these functions local or what? > > Also why does it have 'func' prefix? It is a function > obviously, we don't add 'func' prefix to all functions. OK > > +-- > > +-- gh-5806: defer xlog cleanup to keep xlogs until > > +-- replicas present in "_cluster" are connected. > > +-- Otherwise we are getting XlogGapError since > > +-- master might go far forwad from replica and > > 2. forwad -> forward. Thanks! > > + | --- > > + | ... > > +for i=1,2 do func_xlog_snap(box.space.testtemp, {i}) end > > 3. Honestly, it would look much simpler if it would be just 4 > lines with 2 inserts and 2 snapshots. Sure, I can make it so. > > 4. Why do you do rw requests both on the replica and master? To intermix data so that lsns would be different > And why do you need 2 spaces? This allows to write xlog data specifically on replica and only in this case I managed to reach XlogGapError (otherwise the replica reported that it is too old and restarted rejoin procedure). > > + > > +-- > > +-- Restart the masted and generate the > > 5. masted -> master. Thanks:) > > > +-- next range of xlogs. > > +test_run:switch('default') > > + | --- > > + | - true > > + | ... > > +test_run:cmd('stop server master') > > + | --- > > + | - true > > + | ... > > +test_run:cmd('start server master with wait_load=True') > > 6. Does 'restart server master' command work? I must confess I didn't know about this command. Will try. > > +-- > > +-- Restart master node and the replica then. > > 7. Why do you need to restart the master 2 times? To make sure the GC passed a few iterations. Maybe we could manage with one as well. Thanks for the point will try. >> > +-- > > +-- Wait error to appear. > > +while test_run:grep_log("master", "XlogGapError") == nil do fiber.sleep(0.01) end > > 8. We have test_run:wait_log(). Didn't know, thanks!