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 7B09E6FC8F; Tue, 23 Mar 2021 00:41:08 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7B09E6FC8F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616449268; bh=gsifQhI12wh2pjiJA2rZMde5JAR9eIsXNZnOzn+yvNo=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Ze44RvHEqw8MffJOqVi4hs0qKaI9/wpu+W6P7TPQOnhpClEZTlRWcWyggT69TgJhn S5IPxU0zsuR1UXR8AGIjjxENCli/uV3QPUWF1tBXIxDWi0kB41zpMBD7MUd7/PldbJ XFeuhvr9vd5if2UibcBj8KGn8gnAQ5mRT7hdqhG0= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 6C2BD6FC8F for ; Tue, 23 Mar 2021 00:40:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6C2BD6FC8F Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1lOSI1-0003Fk-UF; Tue, 23 Mar 2021 00:40:46 +0300 To: Cyrill Gorcunov , tml References: <20210320131521.1249747-1-gorcunov@gmail.com> <20210320131521.1249747-3-gorcunov@gmail.com> Message-ID: <182244fe-0e93-7dec-15d3-6844a1f42a23@tarantool.org> Date: Mon, 22 Mar 2021 22:40:44 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210320131521.1249747-3-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD95D6E7CC48CB1F5F10D3016C09B407F8B1E2E766A3410B623182A05F5380850402394DC028BA52DEC95A71A825AC56269CFBD40E201638B3F0CE7D9A81395E2C3 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7DD4CC05688AD5D0CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F5B2F26146BDF5648638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C686AF563A045C75E59AC09E7FD74EEE86827832CBF86D1A6A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE70F3DDF2BBF19B93A9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C353FA85A707D24CADCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E34F43C7A68FF626056395957E7521B51C2D96E472CDF7238E04AD6D5ED66289B5278DA827A17800CE732FCE54C4D9A645493EC92FD9297F6715571747095F342E857739F23D657EF2BD5E8D9A59859A8B64D263EB3BC80FB53089D37D7C0E48F6C5571747095F342E857739F23D657EF2B6825BDBE14D8E70227F01F88B6EF2528BD9CCCA9EDD067B1EDA766A37F9254B7 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2BBE337FB72E923155C0AF1600DCBC20B386D740E071D760D8D98E15FC611CFF9 X-C1DE0DAB: 0D63561A33F958A519FE6F272FB774752051EECFFD4F3252BB92ACFE23BE8366D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A5BF8FA0BD61F9943D821F546742F0F50BD2EBB03D348322337C0807D390D3FEB54E5C09DF7A35241D7E09C32AA3244C5E6B9BDF0F43CF386DBE475EF18445B135DA7DC5AF9B58C08D5DD81C2BAB7D1D X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojWJZv20R+6UhdzDvOr9NIwQ== X-Mailru-Sender: 689FA8AB762F73936BC43F508A06382249726FA8ADBC5639D674BF48E492BBCA3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 2/3] 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Cc: Mons Anderson Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" I appreciate the work you did here! See 4 comments below. > diff --git a/test/replication/gh-5806-xlog-cleanup.result b/test/replication/gh-5806-xlog-cleanup.result > new file mode 100644 > index 000000000..26e7519fc > --- /dev/null > +++ b/test/replication/gh-5806-xlog-cleanup.result > @@ -0,0 +1,397 @@ > +-- > +-- Keep small number of snaps to force cleanup > +-- procedure be more intensive. > +box.cfg{checkpoint_count = 1} > + | --- > + | ... > + > +engine = test_run:get_cfg('engine') > + | --- > + | ... > +s = box.schema.space.create('test', {engine = engine}) > + | --- > + | ... > +_ = s:create_index('pk') > + | --- > + | ... > + > +test_run:switch('default') > + | --- > + | - true > + | ... > +test_run:cmd('create server replica with rpl_master=master,\ > + script="replication/gh-5806-slave.lua"') > + | --- > + | - true > + | ... > +test_run:cmd('start server replica with wait=True, wait_load=True') > + | --- > + | - true > + | ... > + > +-- > +-- On replica we create an own space which allows us to > +-- use more complex scenario and disableds replica from 1. disableds -> disables. 2. Please, be more specific. Why does it prevent from automatic rejoin? Because it would lead to loss of the replica's own data. > +-- automatic rejoin. Otherwise XlogGapError won't happen. > +test_run:switch('replica') > + | --- > + | - true > + | ... > +box.cfg{checkpoint_count = 1} > + | --- > + | ... > +s = box.schema.space.create('testtemp', {temporary = true}) 3. Why do you need it to be temporary = true? > + | --- > + | ... > +_ = s:create_index('pk') > + | --- > + | ... > +box.space.testtemp:insert({1}) > + | --- > + | - [1] > + | ... > +box.snapshot() > + | --- > + | - ok > + | ... > +box.space.testtemp:insert({2}) > + | --- > + | - [2] > + | ... > +box.snapshot() > + | --- > + | - ok > + | ... > + > +-- > +-- Stop the replica node and generate > +-- first range of xlogs on the master. > +test_run:switch('default') > + | --- > + | - true > + | ... > +test_run:cmd('stop server replica') > + | --- > + | - true > + | ... > + > +test_run:switch('master') > + | --- > + | - true > + | ... > +box.space.test:insert({1}) > + | --- > + | - [1] > + | ... > +box.snapshot() > + | --- > + | - ok > + | ... > +box.space.test:insert({2}) > + | --- > + | - [2] > + | ... > +box.snapshot() > + | --- > + | - ok > + | ... > + > +-- > +-- Restart the master and generate the > +-- next range of xlogs. 4. I think I already asked, but why do you need to restart the master and generate a second pair of snapshots? Why isn't it enough to have 1 pair created before the restart? Whatever is the answer, it must be in the comments. > +test_run:switch('default') > + | --- > + | - true > + | ...