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 E3EAA6EC5F; Mon, 19 Apr 2021 12:30:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E3EAA6EC5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618824651; bh=0wHwLvjOKsOmjof2StecuqPL1qhaGD7YHaK1xYTncbc=; 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=oW/aNaH71WrMLmqv2bFMeWATs4tn8ZnR6zJxswFckbtVc8ZyEmRLuwKB5xiIJcwri iDqZ4ExKJtPJmVY1bX3/l0dzo+AiLlb8trbnUzmA9PV8FwtqXT+xrpTbImnishrHYs qvxVSynFQ7UIr4NDpH4dKAT98ELvqTaYe+cUikXQ= Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [94.100.177.92]) (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 CD4AB6EC5F for ; Mon, 19 Apr 2021 12:30:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CD4AB6EC5F Received: by smtp32.i.mail.ru with esmtpa (envelope-from ) id 1lYQEy-0003A6-4M; Mon, 19 Apr 2021 12:30:48 +0300 To: Vladislav Shpilevoy , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: <3161d468-6f98-802a-56a1-2955a891b4fa@tarantool.org> Message-ID: <9ab28f4a-5604-0de9-5fd8-d67beefb184e@tarantool.org> Date: Mon, 19 Apr 2021 12:30:47 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <3161d468-6f98-802a-56a1-2955a891b4fa@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480D608FE24BC85426BB1B55F651FED8C70182A05F538085040C00CC9258901CEA428E9F34B6C04C192B426A81047E88941B490003E1ACB388C X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE785DAC9A352760686C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE731D82F3F177D3BCDEA1F7E6F0F101C67CDEEF6D7F21E0D1D9295C2E9FA3191EE1B59CA4C82EFA6586D4164787D6721C75B15C70134381987F6B57BC7E64490618DEB871D839B73339E8FC8737B5C22498424CA1AAF98A6958941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B68424CA1AAF98A6958941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD2691661749BA6B97735C0C3A4CC285C05977B076A6E789B0E97A8DF7F3B2552694A1E7802607F20496D49FD398EE364050FB28585415E75ADA99D765CF6BB0EE041B3661434B16C20AC78D18283394535A9E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B60A62CEF541B197C8089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24209795067102C07E8F7B195E1C97831D79DF153D772A7E2DEE0BF9F2B90C42B X-C1DE0DAB: 0D63561A33F958A53011E06827F13CA5200AA7D280518BC5B3B894650101F251D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349DAEDEF7DE8FDCFA8E408B98880E6C9B009BC609C3DD56C8B17580DD360A6D8C86C44CEA647D87F01D7E09C32AA3244C224A5E79315B14A72B33E3681BDA395B853296C06374E602FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojocJA+pXcDunsp27xJIsn0g== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F8209558ADADB540A5DD9E4DA8DA17B8C7F18609B7C082164A424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 07/12] raft: filter rows based on known peer terms 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" 18.04.2021 19:27, Vladislav Shpilevoy пишет: >> diff --git a/test/replication/gh-5445-leader-inconsistency.result b/test/replication/gh-5445-leader-inconsistency.result >> new file mode 100644 >> index 000000000..5c6169f50 >> --- /dev/null >> +++ b/test/replication/gh-5445-leader-inconsistency.result >> @@ -0,0 +1,292 @@ > <...> > >> +-- Old leader returns and old unconfirmed rows from it must be ignored. >> +-- Note, it wins the elections fairly. >> +test_run:cmd('start server '..leader..' with args="3 0.4 voter"') >> + | --- >> + | - true >> + | ... >> +test_run:wait_lsn(leader, next_leader) >> + | --- >> + | ... >> +test_run:switch(leader) >> + | --- >> + | - true >> + | ... >> +test_run:wait_cond(function() return box.space.test:get{2} == nil end) >> + | --- >> + | - true >> + | ... >> +box.cfg{election_mode='candidate'} >> + | --- >> + | ... >> + >> +test_run:switch('default') >> + | --- >> + | - true >> + | ... >> +test_run:switch(next_leader) > You might want to add a check here, that the 'next_leader' > node didn't re-apply any rows from the old leader. So {2} still > does not exist even after these two nodes are in full sync. > But there is such a check below (at the very end): test_run:switch(next_leader)  | ---  | - true  | ... test_run:wait_upstream(1, {status='follow'})  | ---  | - true  | ... box.space.test:select{} -- 1  | ---  | - - [1]  | ... -- Serge Petrenko