[Tarantool-patches] [RFC 0/4] qsync: evaluate replication_synchro_quorum dynamically

Cyrill Gorcunov gorcunov at gmail.com
Thu Nov 19 22:40:56 MSK 2020

>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(-)


More information about the Tarantool-patches mailing list