From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (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 2CB6D469710 for ; Thu, 19 Nov 2020 22:41:06 +0300 (MSK) Received: by mail-lj1-f193.google.com with SMTP id b17so7486296ljf.12 for ; Thu, 19 Nov 2020 11:41:06 -0800 (PST) From: Cyrill Gorcunov Date: Thu, 19 Nov 2020 22:40:56 +0300 Message-Id: <20201119194100.840495-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [RFC 0/4] qsync: evaluate replication_synchro_quorum dynamically List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Cc: Vladislav Shpilevoy >From the issue description: > The reason is that users will likely not understand how the option > should be configured properly, and will break something accidentally. > So this idea about allowance to write an expression on the cluster > size allows to specify the canonical N/2 + 1 formula, and not update > it manually on all instances, when a new node is added, or an existing > one is deleted. The series provides a first draft/rfc for review. As to me current pucture is muddy. The whole cfg subsystem is too overloaded - some parts are configured on lua level then passed to C level where the values are finally stored. I think we need to keep configuration core on C level, simply providing a thin interface to lua this will allow to share settings (for example I've had a huge problems when been implementing separate log module config). Anyway in the series we start to allow cofigure replication_synchro_quorum settings via symbolic representation. Please take a look. There is NO tests yet, no docs update just an early draft to share. Maybe you share some ideas how to make this code less messy since now I'm far from being happy with it. Thus any comments are highly appreciated! issue https://github.com/tarantool/tarantool/issues/5446 branch gorcunov/gh-5446-eval-quorum Cyrill Gorcunov (4): cfg: add cfg_isnumber helper qsync: move synchro quorum update to separate routine cfg: prepare symbolic evaluation of replication_synchro_quorum qsync: allow to specify replication_synchro_quorum as a formula src/box/alter.cc | 2 + src/box/box.cc | 81 ++++++++++++++++++++++++++++++++++++++-- src/box/box.h | 1 + src/box/lua/load_cfg.lua | 3 +- src/box/replication.cc | 49 ++++++++++++++++++++++++ src/box/replication.h | 12 ++++++ src/cfg.c | 9 +++++ src/cfg.h | 6 +++ 8 files changed, 157 insertions(+), 6 deletions(-) -- 2.26.2