Tarantool development patches archive
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: Mons Anderson <v.perepelitsa@corp.mail.ru>,
	tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v4 2/3] cfg: support symbolic evaluation of replication_synchro_quorum
Date: Sun, 20 Dec 2020 21:28:41 +0300	[thread overview]
Message-ID: <20201220182841.GF3139@grain> (raw)
In-Reply-To: <47af00c0-5f40-533c-f51c-84d16c609c11@tarantool.org>

On Sun, Dec 20, 2020 at 06:01:25PM +0100, Vladislav Shpilevoy wrote:
...
> 
> I saw the comment and I understood it. But it does not mean the function
> can now return random values. It does not matter if you return 0 or 1 or
> whatever else. It still can't be used for anything useful except check < 0.
> 
> That makes the function result confusing and even useless.
> 
> Previously quorum value was returned *and used as quorum value*. Now it
> is used only for < 0 check. Hence, why do you need to return anything
> except -1 and 0?
> 
> For example, look at box_check_replication_synchro_timeout(). It returns
> *timeout value*, which is used to set replication_synchro_timeout.
> 
> box_set_replication_synchro_quorum() before your patch did the same
> with box_check_replication_synchro_quorum(). Now it uses check() result
> only to compare it with < 0, which is *confusing* - why would it need
> to return anything but -1 and 0 then?
> 
> Here is what I want to see:

Aha, I see what you mean. I think we should split then.

 - change existing code to return 0|-1
 - then introduce new code

this allows us to see the changes more clearly

  reply	other threads:[~2020-12-20 18:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 11:39 [Tarantool-patches] [PATCH v4 0/3] qsync: evaluate replication_synchro_quorum dynamically Cyrill Gorcunov
2020-12-14 11:39 ` [Tarantool-patches] [PATCH v4 1/3] cfg: add cfg_isnumber helper Cyrill Gorcunov
2020-12-14 11:39 ` [Tarantool-patches] [PATCH v4 2/3] cfg: support symbolic evaluation of replication_synchro_quorum Cyrill Gorcunov
2020-12-16 13:21   ` Serge Petrenko
2020-12-16 13:35     ` Cyrill Gorcunov
2020-12-17 23:17   ` Vladislav Shpilevoy
2020-12-18  7:25     ` Cyrill Gorcunov
2020-12-20 17:01       ` Vladislav Shpilevoy
2020-12-20 18:28         ` Cyrill Gorcunov [this message]
2020-12-21 17:48   ` Vladislav Shpilevoy
2020-12-21 17:49     ` Vladislav Shpilevoy
2020-12-21 20:02     ` Cyrill Gorcunov
2020-12-21 20:12       ` Cyrill Gorcunov
2020-12-14 11:39 ` [Tarantool-patches] [PATCH v4 3/3] test: add replication/gh-5446-qsync-eval-quorum.test.lua Cyrill Gorcunov
2020-12-16 13:25   ` Serge Petrenko
2020-12-17 23:18   ` Vladislav Shpilevoy
2020-12-18  8:14     ` Cyrill Gorcunov
2020-12-20 17:01       ` Vladislav Shpilevoy
2020-12-20 18:27         ` Cyrill Gorcunov
2020-12-21 16:05         ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201220182841.GF3139@grain \
    --to=gorcunov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.perepelitsa@corp.mail.ru \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v4 2/3] cfg: support symbolic evaluation of replication_synchro_quorum' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox