From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [94.100.177.107]) (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 44715469710 for ; Fri, 20 Nov 2020 14:39:04 +0300 (MSK) References: <20201119194100.840495-1-gorcunov@gmail.com> <20201119194100.840495-3-gorcunov@gmail.com> <2cb79b7d-b2f4-fc42-b707-31e109b0ff69@tarantool.org> <20201120110148.GA875895@grain> From: Serge Petrenko Message-ID: <3582e349-1714-294c-968d-7b998cca16fb@tarantool.org> Date: Fri, 20 Nov 2020 14:39:03 +0300 MIME-Version: 1.0 In-Reply-To: <20201120110148.GA875895@grain> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [Tarantool-patches] [RFC 2/4] qsync: move synchro quorum update to separate routine List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tml , Vladislav Shpilevoy 20.11.2020 14:01, Cyrill Gorcunov пишет: > On Fri, Nov 20, 2020 at 01:06:55PM +0300, Serge Petrenko wrote: >> IMO it'd be better to name the new function somewhat similar  to >> `box_update_replication_synchro_quorum` and leave it in box.cc >> >> >> This way you avoid adding 2 new dependencies to replication.cc >> and leave all the code dealing with reconfiguration at one place. >> >> Besides, replication.cc already depends on box, so it won't be a problem >> to call update_replication_synchro_quorum there. > Yeah, I don't mind, thanks! > >> Load_cfg.lua will say something similar, when replication_synchro_quorum is >> a number: >> >> ``` >> >>             log.info("set '%s' configuration option to %s", key, >>                 json.encode(val)) >> >> ``` >> >> So this say_info belongs to the trigger you invoke on replica >> register/unregister. > It will say "set ... to n+2/1" while we're printing the evaluated > integer value which is more informative. Yes, but when it's actually  configured to number, there'll be duplicate messages. You already have the needed log message in the next commit. -- Serge Petrenko