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 6EE956FC8F; Thu, 25 Mar 2021 01:10:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6EE956FC8F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616623844; bh=Vh3YuVOftdqRWBJDPyo98ANy2+97UxE8TQoHyURgChY=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=xEIuX3ni4xYibA1NiOYGethrDPowsv2KJBATVyxBQw58E5dvambBBDilR6npiQagU Zp7qTv9xqzTURLQxUPlWEKdzEFjuppXuixR5zmiMfV7o+9mgvzV/nVNuXwYH/HKPtt 1zMBtVgKCE6lPck+wUgOD1DdW0Iwcy9pZXOqzuUM= Received: from smtp54.i.mail.ru (smtp54.i.mail.ru [217.69.128.34]) (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 4E4DC6FC8F for ; Thu, 25 Mar 2021 01:10:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4E4DC6FC8F Received: by smtp54.i.mail.ru with esmtpa (envelope-from ) id 1lPBho-000362-1K; Thu, 25 Mar 2021 01:10:24 +0300 To: Cyrill Gorcunov , tml References: <20210324163759.1900553-1-gorcunov@gmail.com> <20210324163759.1900553-3-gorcunov@gmail.com> Message-ID: <4b25e784-84b8-0a5d-d48c-2a47eb939d09@tarantool.org> Date: Wed, 24 Mar 2021 23:10:23 +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: <20210324163759.1900553-3-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9064ADF4728AA0EE9AECA9F3C9C9885BEE78E91CF33279E24182A05F53808504009513EFCCB419EEF308EAFF0EE8ED0D87C8915904018402C43E36F540D788720 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A609AE8E79ADB41CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063795AFAF91F541EBCE8638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C5DD32608FC869F5D4CEBC195BBC0811E4E3E87FD18669712A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE77A825AB47F0FC8649FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C353FA85A707D24CADCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C2249D323265F4920F39D76E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8B3A746B66CB4BBB9E3AA81AA40904B5D9DBF02ECDB25306B2201CA6A4E26CD07C3BBE47FD9DD3FB595F5C1EE8F4F765FC72CEEB2601E22B091A620F70A64A45A99449624AB7ADAF372E808ACE2090B5E1725E5C173C3A84C33D321E7403792E343D7D993A0B92D134F5D81C698A659EA775ECD9A6C639B01BC09775C1D3CA48CF335407143AA9223635872C767BF85DA22EF20D2F80756B5F40A5AABA2AD3711975ECD9A6C639B01B78DA827A17800CE7E1BCFB2C0BE3F189731C566533BA786A40A5AABA2AD371193C9F3DD0FB1AF5EB417FD7EC7EC0BD913C9F3DD0FB1AF5EB4E70A05D1297E1BBCB5012B2E24CD356 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24A6D60772A99906F8E1CD14B953EB46D99AED8FA12E045ED355D89D7DBCDD132 X-C1DE0DAB: 0D63561A33F958A5493F30B4909CD70873515BAA0765B6D8E5902F7E6BD564ACD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D343FB425EC7F4D4A4B3F9A206862F28BE716424AA995AB3660CE2427B30B1583802BA2D5DB595A139B1D7E09C32AA3244C0BDAC8FD996FE54053724C2460D9BCE155E75C8D0ED9F6EE927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojjqzNotmU+gdgXnZ7VO9bYw== X-Mailru-Sender: 504CC1E875BF3E7D9BC0E5172ADA31101F717F922F67B76D223BF36894D8144908D94F51DA2DA45907784C02288277CA03E0582D3806FB6A5317862B1921BA260ED6CFD6382C13A6112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for working on this! 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..88b272e62 > --- /dev/null > +++ b/test/replication/gh-5806-xlog-cleanup.result > @@ -0,0 +1,356 @@ > +-- > +-- On replica we create an own space which allows us to > +-- use more complex scenario and disables replica from > +-- automatic rejoin (since replica can't do auto-rejoin if > +-- there gonna be an own data loss). This allows us to > +-- trigger XlogGapError in the log. > +test_run:switch('replica') > + | --- > + | - true > + | ... > +box.cfg{checkpoint_count = 1} > + | --- > + | ... > +s = box.schema.space.create('testreplica') > + | --- > + | ... > +_ = s:create_index('pk') > + | --- > + | ... > +box.space.testreplica:insert({1}) > + | --- > + | - [1] > + | ... > +box.snapshot() > + | --- > + | - ok > + | ... > + > +-- > +-- Stop the replica node and generate > +-- xlogs on the master. > +test_run:switch('default') 1. You could switch to the master right away. No need to switch through the default node. > + | --- > + | - true > + | ... > +test_run:cmd('stop server replica') > + | --- > + | - true > + | ... > + > +test_run:switch('master') > + | --- > + | - true > + | ... > +box.space.test:insert({1}) > + | --- > + | - [1] > + | ... > +box.snapshot() > + | --- > + | - ok > + | ... > + > +-- > +-- We need to restart the master node since otherwise > +-- the replica will be preventing us from removing old > +-- xlog because it will be tracked by gc consumer which > +-- kept in memory while master node is running. > +-- > +-- Once restarted we write a new record into master's > +-- space and run snapshot which removes old xlog required > +-- by replica to subscribe leading to XlogGapError which > +-- we need to test. > +test_run:switch('default') 2. You can restart the master without switching to default. > + | --- > + | - true > + | ... > +test_run:cmd('restart server master with wait_load=True') > + | --- > + | - true > + | ... > +test_run:switch('master') > + | --- > + | - true > + | ... > +box.space.test:insert({2}) > + | --- > + | - [2] > + | ... > +box.snapshot() > + | --- > + | - ok > + | ... > +assert(box.info.gc().is_paused == false) > + | --- > + | - true > + | ... > + > +-- > +-- Start replica and wait for error. > +test_run:switch('default') 3. You don't need to switch to default to start the replica. All the same switch-comments for 'Case 2' test. > + | --- > + | - true > + | ... > +test_run:cmd('start server replica with wait=False, wait_load=False') > + | --- > + | - true > + | ... > + > +-- > +-- Wait error to appear. > +test_run:wait_log('master', 'XlogGapError', 1024, 10) ~= nil 4. 10 seconds is a tiny timeout. Seconds is not enough as the synchronous replication tests have shown. But why do you even need non-default parameters? > + | --- > + | - true > + | ... > +