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 6B8616F3E5; Thu, 11 Nov 2021 18:04:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6B8616F3E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1636643094; bh=xcaoONJRUaYbaBcfiPaM+d+WAfaTktzLUj6BDr5wm6g=; h=In-Reply-To:Date:References:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=PkmU23dnUgAmQ3Uv10fhoGdSrE/qu0LbYoTVRB/rVNtQZOuhg2pjj8gJin9sP4Ul/ 2hNKlwYm/QXeis4kBu2C7ZILj8JFNc4KrsGqZeBJ58hVOeOO6bI8b9ay8ib/FZ5Jdp SULTLB7FzU4QcCGz+z2zXpoQS1RVrkympLaPj2Qw= Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (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 F0AA76F3E5 for ; Thu, 11 Nov 2021 18:04:52 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F0AA76F3E5 Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1mlBdE-0003AL-4b; Thu, 11 Nov 2021 18:04:52 +0300 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) In-Reply-To: <5ae7bc55-485c-d526-9c84-3cbba13b6254@tarantool.org> Date: Thu, 11 Nov 2021 18:04:50 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <04CEC0FF-209C-4534-80BB-BF88AE097E33@tarantool.org> References: <20211025095223.22521-1-ya.shtunder@gmail.com> <665ef444-80de-4848-f9f0-a3ccc6e7c059@tarantool.org> <5ae7bc55-485c-d526-9c84-3cbba13b6254@tarantool.org> To: =?utf-8?B?0K/QvSDQqNGC0YPQvdC00LXRgA==?= X-Mailer: Apple Mail (2.3654.120.0.1.13) X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9731B3922EC063979CAB00300CDA98DC51CCA794E1CC6B18A00894C459B0CD1B9D9CFC8129B2EB46A279B8E503C101A5345ABDAF27F9F75410F3046A6F430FAC3 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7624C4D757C4F5837EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637D58A1C8964E53F0E8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8318BD0BF648281088CB4A81033FA4041117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18C26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B642416645EBD45DC2089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5B48F58BC80812C85E113D0F68E96ECCEB1DC9340D6357AC9D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75438CC92D4039F4E2410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3403182E70AE6895E02A2A19AB8D8501D92C656480524A5EACB566D302D6076F3592E7686F64DB85DC1D7E09C32AA3244C86F7E13C6449DF04D69C6861622EE34E5A1673A01BA68E40FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj4t8MBgWr8bIEHGtjCrP55g== X-Mailru-Sender: 3B9A0136629DC912F4AABCEFC589C81EFE4427551B6C41A926289C51DA5691EC4CE25E506CC2FE8EAD07DD1419AC565FA614486B47F28B67C5E079CCF3B0523AED31B7EB2E253A9E112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v3] replication: removing anonymous replicas from synchro quorum 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: sergos via Tarantool-patches Reply-To: sergos Cc: tml Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thanks for the patch!=20 Just a nit in message and a question re the test below. Sergos. The changelog is from = https://github.com/tarantool/tarantool/commit/b9feb3853fbce389471ad3022307= 942aa92e8ea7 > Transactions should be committed after they reach quorum of "real" > cluster members. Therefore, anonymous replicas don't have to I would rephrase it as =E2=80=98replicas shouldn=E2=80=99t = participate=E2=80=99 =09 > participate in the quorum. >=20 >> +++ b/test/replication-luatest/gh_5418_qsync_with_anon_test.lua >> @@ -0,0 +1,62 @@ >> +local t =3D require('luatest') >> +local cluster =3D require('test.luatest_helpers.cluster') >> +local helpers =3D require('test.luatest_helpers') >> + >> +local g =3D t.group('gh-5418', {{engine =3D 'memtx'}, {engine =3D = 'vinyl'}}) >> + >> +g.before_each(function(cg) >> + local engine =3D cg.params.engine >> + >> + cg.cluster =3D cluster:new({}) >> + >> + local box_cfg =3D { >> + replication =3D { >> + helpers.instance_uri('master') >> + }, >> + replication_synchro_quorum =3D 2, >> + replication_timeout =3D 1 >> + } >> + >> + cg.master =3D cg.cluster:build_server({alias =3D 'master', = engine =3D engine, box_cfg =3D box_cfg}) >> + >> + local box_cfg =3D { >> + replication =3D { >> + helpers.instance_uri('master'), >> + helpers.instance_uri('replica') >> + }, >> + replication_timeout =3D 1, >> + replication_connect_timeout =3D 4, >> + read_only =3D true, >> + replication_anon =3D true >> + } >> + >> + cg.replica =3D cg.cluster:build_server({alias =3D 'replica', = engine =3D engine, box_cfg =3D box_cfg}) >> + >> + cg.cluster:add_server(cg.master) >> + cg.cluster:add_server(cg.replica) >> + cg.cluster:start() >> +end) >> + >> + >> +g.after_each(function(cg) >> + cg.cluster.servers =3D nil >> + cg.cluster:drop() >> +end) >> + >> + >> +g.test_qsync_with_anon =3D function(cg) >> + cg.master:eval("box.schema.space.create('sync', {is_sync =3D = true})") >> + cg.master:eval("box.space.sync:create_index('pk')") >> + cg.master:eval("box.ctl.promote()") >> + >> + t.assert_error_msg_content_equals("Quorum collection for a = synchronous transaction is timed out", >> + function() cg.master:eval("return box.space.sync:insert{1}") = end) >> + >> + -- Wait until everything is replicated from the master to the = replica >> + local vclock =3D cg.master:eval("return box.info.vclock") >> + vclock[0] =3D nil >> + helpers:wait_vclock(cg.replica, vclock) >> + By this point the insert() is replicated from the master. I wonder if = ROLLBACK will be delivered to the replica by the time of select()? >> + t.assert_equals(cg.master:eval("return = box.space.sync:select()"), {}) >> + t.assert_equals(cg.replica:eval("return = box.space.sync:select()"), {}) >> +end