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 87DCD6E46D; Wed, 13 Oct 2021 19:01:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 87DCD6E46D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1634140862; bh=O9MiSak8+duNy7+ui2PMaucqa69YXxeP7VPK6Fi6hcs=; h=Date:In-Reply-To:Cc:To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=UL6vsrGBNVtzzh0AMRI5/KStAEaFmWmaQnFJA0Ik/Cj/CBm+mM0V+Myp7sLn+Vgr1 iq6YNYwEXYFfIn1H9UBjpB+0GPxbMUh5OR5aAZK84CNaG2D6Nr3foBVjAxiXLcMoe9 aiG8DVgsMst2hycemnDIbBii3vr1SCOLabJaE/LQ= Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (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 91AC76E46D for ; Wed, 13 Oct 2021 19:01:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 91AC76E46D Received: by smtp16.mail.ru with esmtpa (envelope-from ) id 1maggd-0008Lq-U2; Wed, 13 Oct 2021 19:01:00 +0300 Message-Id: <7379AE45-3AAA-42EC-B286-67CFB1047ADA@tarantool.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_CD9012EA-7FB7-430C-A981-9E5D63954855" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Date: Wed, 13 Oct 2021 19:00:59 +0300 In-Reply-To: <7ba9ad66-d3d9-c6c7-c620-9bb180a192c7@tarantool.org> Cc: tarantool-patches@dev.tarantool.org To: Serge Petrenko References: <09E805A1-CB76-41B8-8A5C-E4660603520E@tarantool.org> <7ba9ad66-d3d9-c6c7-c620-9bb180a192c7@tarantool.org> X-Mailer: Apple Mail (2.3654.120.0.1.13) X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9962CB5145ACAD0EF6BFB1FBBA12CC8D8DE1EF72FDDBD925300894C459B0CD1B900C277F6662FE3B799431B34B273193906816586D341252B96422291B010A18A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7235646FAB97B4BEDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637663000D94094A5D68638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8434CED607F3D8202E787AA07AD957DD0117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC55D5BE2F85BDEC5FA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B682BBBAF5DF00056E089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5BD1B31CA5C28BE5C83AB28308936930133838A71FE1301ACD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA754A161BC97E2066CA410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349FF8F8245A2FAA7B69AD5F719B4B6106A3A324A4DDC4F71DAA0A59AE475074453BFF45811F80824E1D7E09C32AA3244CA1726884A9B9D21DBAAD6E550D05E82D97FE24653F78E668729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj+P5XwFBO7S8Tk4gnBWX9tg== X-Mailru-Sender: 3B9A0136629DC912F4AABCEFC589C81EE1A1E16D3F26E6BFE71CBA6BD1857359518EE19098D59E01AD07DD1419AC565FA614486B47F28B67C5E079CCF3B0523AED31B7EB2E253A9E112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 1/2] replicaiton: make anon replica connect to quorum upon reconfiguration 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" --Apple-Mail=_CD9012EA-7FB7-430C-A981-9E5D63954855 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Thanks for explanation! LGTM. Sergos > On 12 Oct 2021, at 16:38, Serge Petrenko = wrote: >=20 >=20 >=20 > 12.10.2021 12:56, sergos =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> Hi! >>=20 >> This one looks unnecessary, since you rework it in second part. >>=20 >> Sergos. > Hi! Thanks for the review! >=20 > The rework you mention is simply a refactoring, while this commit = introduces > a change in behaviour. That's why I extracted it. >>> On 5 Oct 2021, at 16:18, Serge Petrenko = wrote: >>>=20 >>> Once an anonymous replica tries to register, it reconnects to every >>> other instance in its replication list in order to receive updated >>> ballots and choose someone to register on. >>>=20 >>> Make the instance wait until it connects to quorum before letting it >>> choose the node to register on. >>> --- >>> src/box/box.cc | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>=20 >>> diff --git a/src/box/box.cc b/src/box/box.cc >>> index 0b12b1328..219ffa38d 100644 >>> --- a/src/box/box.cc >>> +++ b/src/box/box.cc >>> @@ -1404,7 +1404,7 @@ box_set_replication_anon(void) >>> * them can register and others resend a >>> * non-anonymous subscribe. >>> */ >>> - box_sync_replication(false); >>> + box_sync_replication(true); >>> /* >>> * Wait until the master has registered this >>> * instance. >>> --=20 >>> 2.30.1 (Apple Git-130) >>>=20 >=20 > --=20 > Serge Petrenko --Apple-Mail=_CD9012EA-7FB7-430C-A981-9E5D63954855 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Thanks for explanation!

LGTM.
Sergos


On 12 = Oct 2021, at 16:38, Serge Petrenko <sergepetrenko@tarantool.org> wrote:



12.10.2021 12:56, sergos =D0=BF=D0=B8=D1=88=D0=B5=D1=82:=
Hi!

This one looks unnecessary, since you rework = it in second part.

Sergos.
Hi! Thanks for the review!

The rework you mention is simply a refactoring, while this = commit introduces
a change in behaviour. That's why I extracted it.
On 5 Oct 2021, at 16:18, = Serge Petrenko <sergepetrenko@tarantool.org> wrote:

Once an anonymous replica tries to register, it reconnects to = every
other instance in its replication list in order to = receive updated
ballots and choose someone to register = on.

Make the instance wait until it = connects to quorum before letting it
choose the node to = register on.
---
src/box/box.cc | 2 +-
1 file = changed, 1 insertion(+), 1 deletion(-)

diff = --git a/src/box/box.cc = b/src/box/box.cc
index 0b12b1328..219ffa38d 100644
--- = a/src/box/box.cc
+++ b/src/box/box.cc
@@ -1404,7 +1404,7 @@ = box_set_replication_anon(void)
 * them can register and = others resend a
 * non-anonymous = subscribe.
 */
- = box_sync_replication(false);
+ = box_sync_replication(true);
/*
= =  * Wait until = the master has registered this
 * instance.
-- 
2.30.1 (Apple Git-130)


-- Serge = Petrenko

= --Apple-Mail=_CD9012EA-7FB7-430C-A981-9E5D63954855--