From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 63387469710 for ; Wed, 25 Nov 2020 15:19:10 +0300 (MSK) Received: by mail-lf1-f67.google.com with SMTP id u18so2818497lfd.9 for ; Wed, 25 Nov 2020 04:19:10 -0800 (PST) Date: Wed, 25 Nov 2020 15:19:07 +0300 From: Cyrill Gorcunov Message-ID: <20201125121907.GO875895@grain> References: <20201124152405.1174898-1-gorcunov@gmail.com> <20201124152405.1174898-3-gorcunov@gmail.com> <20201125115538.GM875895@grain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v2 2/3] cfg: support symbolic evaluation of replication_synchro_quorum List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Petrenko Cc: tml , Vladislav Shpilevoy On Wed, Nov 25, 2020 at 03:10:48PM +0300, Serge Petrenko wrote: > > > > > +box_renew_replication_synchro_quorum(void) > > > What do you think of `box_update_replication_synchro_quorum`? > > I don't mind with any name, so I'llupdate it to match. > > > > You know the most thing which bothers me most is the fact > > that we're calling box function from a deep code chain of > > replication engine. replica_set/clear helpers are bound to > > replication internals and ideally should know nothing about > > box configuration that's why I thought of some kind of > > notification hooks or triggers. > > > > Say replicaset allocates a trigger on init and allow any code > > to be notified with stage changes. In our case the stage is replica > > id set or clear. Thus box could setup a trigger into replicaset > > and we simply run the trigger. For me this would look a way > > more natural but I'm not sure, because this will require to > > introduce "stages" and instead of a single call to box_ we > > will have a way more bigger patch with unclear picture... > > Simply dunno. > > > I see. I'm not sure we need to implement this. > > IMO it looks ok now. Let's wait for Vladislav's opinion. Sure, I'm fine with leaving it as a direct call for now.