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 321506F3C8; Sat, 27 Mar 2021 22:23:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 321506F3C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616873028; bh=1/NFJM5VRh7jbF2T+5uBL9y3IQTRMzH0ozQTcgh8XdQ=; 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=XN1GlCLiL26hHHGbtHCePKQdifsnRgOKN6lqqobncJSgNWctuJMqNpiQMXx8dQi3+ W1p4oJS0S98fEZF/GLLEKcvqkZFgSFsCek3F43t4gwWZp5kvMr0eoo1m+Mql+XPP30 rz4EybKZT0AMqnKtPJp3KKuDPjYvAiHd1URXOA84= Received: from smtp35.i.mail.ru (smtp35.i.mail.ru [94.100.177.95]) (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 2DFA16F3C8 for ; Sat, 27 Mar 2021 22:23:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2DFA16F3C8 Received: by smtp35.i.mail.ru with esmtpa (envelope-from ) id 1lQEXC-0002dW-HF; Sat, 27 Mar 2021 22:23:46 +0300 To: Vladislav Shpilevoy , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: <14137c7d7aeea238e2f876bec388923840557cc7.1616588119.git.sergepetrenko@tarantool.org> <566bcb93-7123-3c59-f33d-0dac49592b88@tarantool.org> Message-ID: Date: Sat, 27 Mar 2021 22:23:46 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <566bcb93-7123-3c59-f33d-0dac49592b88@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E32947A0146560F8BA709498CFB6209D8582A182A05F53808504096E9A15F1D77318A6055CAA8CC219F75E40A457D082CE351DB50F3E89C15AB90 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE74323F140F3EE5B6AC2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE704BA85F3D5A9F85BEA1F7E6F0F101C67CDEEF6D7F21E0D1D174C73DBBBFC7664EE8D505DCF34CAEFE6C0DDBDC337CFA9C41CC282FE5D99C5389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0D9442B0B5983000E8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B64854413538E1713FCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C224951CA34BD62E700AA76E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8B74BE8864E08C29A93AA81AA40904B5D9DBF02ECDB25306B2201CA6A4E26CD07C3BBE47FD9DD3FB595F5C1EE8F4F765FCA83251EDC214901ED5E8D9A59859A8B645423645B6F85954089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2368A440D3B0F6089093C9A16E5BC824AC8B6CDF511875BC4E8F7B195E1C978313501DF7783FFFD26B139F1DD504E1C03 X-C1DE0DAB: 0D63561A33F958A5C6EE76F8D3A4EF025D8603588B0C93F08E5268CE23CA7781D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346C409ABC5F9C579B687F20C55451318FDDD3AA672B1888E7CC110F67835915DF7BF7AA4647F8F4791D7E09C32AA3244CE214E6A4F9B31DAEF1D243820DA5FDE535DA7DC5AF9B58C0FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojhfg4BOnpz0qDFOqVrJ4vjQ== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F803BF7154B23F218BD5999E2F85862A0476C899B9ACEFF212424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 6/7] replication: tolerate synchro rollback during final join 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" 26.03.2021 23:49, Vladislav Shpilevoy пишет: > Thanks for working on this! > >> diff --git a/test/replication/gh-5566-final-join-synchro.result b/test/replication/gh-5566-final-join-synchro.result >> new file mode 100644 >> index 000000000..32749bf12 >> --- /dev/null >> +++ b/test/replication/gh-5566-final-join-synchro.result >> @@ -0,0 +1,139 @@ >> +-- test-run result file version 2 >> +test_run = require('test_run').new() >> + | --- >> + | ... >> + >> +-- >> +-- gh-5566 replica tolerates synchronous transactions in final join stream. >> +-- >> +_ = box.schema.space.create('sync', {is_sync=true}) >> + | --- >> + | ... >> +_ = box.space.sync:create_index('pk') >> + | --- >> + | ... >> + >> +box.schema.user.grant('guest', 'replication') >> + | --- >> + | ... >> +box.schema.user.grant('guest', 'write', 'space', 'sync') >> + | --- >> + | ... >> + >> +-- Part 1. Make sure a joining instance tolerates synchronous rows in final join >> +-- stream. >> +trig = function()\ >> + box.space.sync:replace{1}\ >> +end > You might need to increase the synchro timeout because the default can > be flaky. I think it's fine, since quorum is 1. Do you think we can wait for a WAL write for more than 5 seconds? Anyway, let's change it to a bigger value while we're at it. I've also changed wait_log's timeout to 60 seconds: ========================== diff --git a/test/replication/gh-5566-final-join-synchro.result b/test/replication/gh-5566-final-join-synchro.result index 32749bf12..a09882ba6 100644 --- a/test/replication/gh-5566-final-join-synchro.result +++ b/test/replication/gh-5566-final-join-synchro.result @@ -35,7 +35,10 @@ _ = box.space._cluster:on_replace(trig)  orig_synchro_quorum = box.cfg.replication_synchro_quorum   | ---   | ... -box.cfg{replication_synchro_quorum=1} +orig_synchro_timeout = box.cfg.replication_synchro_timeout + | --- + | ... +box.cfg{replication_synchro_quorum=1, replication_synchro_timeout=60}   | ---   | ... @@ -73,9 +76,6 @@ test_run:cmd('delete server replica')  -- Part 2. Make sure master aborts final join if insert to _cluster is rolled  -- back and replica is capable of retrying it. -orig_synchro_timeout = box.cfg.replication_synchro_timeout - | --- - | ...  -- Make the trigger we used above fail with no quorum.  box.cfg{replication_synchro_quorum=2, replication_synchro_timeout=0.01}   | --- @@ -91,7 +91,7 @@ test_run:cmd('start server replica with wait=False')   | - true   | ... -test_run:wait_log('replica', 'ER_SYNC_QUORUM_TIMEOUT', nil, 10) +test_run:wait_log('replica', 'ER_SYNC_QUORUM_TIMEOUT', nil, 60)   | ---   | - ER_SYNC_QUORUM_TIMEOUT   | ... diff --git a/test/replication/gh-5566-final-join-synchro.test.lua b/test/replication/gh-5566-final-join-synchro.test.lua index 14302f6e6..2db2c742f 100644 --- a/test/replication/gh-5566-final-join-synchro.test.lua +++ b/test/replication/gh-5566-final-join-synchro.test.lua @@ -18,7 +18,8 @@ end  _ = box.space._cluster:on_replace(trig)  orig_synchro_quorum = box.cfg.replication_synchro_quorum -box.cfg{replication_synchro_quorum=1} +orig_synchro_timeout = box.cfg.replication_synchro_timeout +box.cfg{replication_synchro_quorum=1, replication_synchro_timeout=60}  test_run:cmd('create server replica with rpl_master=default,\ script="replication/replica.lua"') @@ -33,7 +34,6 @@ test_run:cmd('delete server replica')  -- Part 2. Make sure master aborts final join if insert to _cluster is rolled  -- back and replica is capable of retrying it. -orig_synchro_timeout = box.cfg.replication_synchro_timeout  -- Make the trigger we used above fail with no quorum.  box.cfg{replication_synchro_quorum=2, replication_synchro_timeout=0.01}  -- Try to join the replica once again. @@ -41,7 +41,7 @@ test_run:cmd('create server replica with rpl_master=default,\ script="replication/replica.lua"')  test_run:cmd('start server replica with wait=False') -test_run:wait_log('replica', 'ER_SYNC_QUORUM_TIMEOUT', nil, 10) +test_run:wait_log('replica', 'ER_SYNC_QUORUM_TIMEOUT', nil, 60)  -- Remove the trigger to let the replica connect.  box.space._cluster:on_replace(nil, trig) -- Serge Petrenko