From: Cyrill Gorcunov <gorcunov@gmail.com> To: Serge Petrenko <sergepetrenko@tarantool.org> Cc: tml <tarantool-patches@dev.tarantool.org>, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Subject: Re: [Tarantool-patches] [RFC 3/4] cfg: prepare symbolic evaluation of replication_synchro_quorum Date: Fri, 20 Nov 2020 15:14:01 +0300 [thread overview] Message-ID: <20201120121401.GE875895@grain> (raw) In-Reply-To: <b7652b68-a260-a49a-dd85-355269461be5@tarantool.org> On Fri, Nov 20, 2020 at 02:56:12PM +0300, Serge Petrenko wrote: > > I was thinking that we're gonna return something like max(1, min(value, 31)) > > so that any evaluated number is correct. Lets better discuss this verbally > then. Ah, I see. Actually I don't mind to change it this way. Looks reasonable. > > > > You should either check every possible value, from 1 to VCLOCK_MAX - 1, > > > to make sure, say, that no division by zero is involved for some input. > > That's the good point. Another question if we should allow formulas like > > n-2, and while n <= 2 assume the quorum to be 1? Ie max(1, eval(n)) > > Yes, that's what I was speaking about above. So that when the formula may > be evaluated correctly (i.e. without division by zero or syntax errors) its > result will automatically be correct. +1 > I guess we shouldn't be this crazy about what is allowed in this formula and > what's not. > If a user has access to box.cfg{}, he may evaluate any expression he wishes > anyway. > > Anyway, this is subject of a verbal discussion. Yes, better discuss. All this formalism is done in a sake "lets provide users options to make sync replication guaranteed" and this contradict the requirements with ability to run arbitrary formula :( > > Back to the former question -- initially I assume the f gonna be linear > > and eval in min/max will be enough. But of course this is not correct. > > > > You know I can pass all N's here but still this doesn't guarantee anything :( > > That's why I'm for more strict rules here: > > > > - allow some symbolic names such as > > "all" -> (alias for f(x) = n) > > "canonical" -> (alias for f(x) = n/2 + 1) > > Sounds good to me. AFAIR others were agains it, though. Yeah, except noone gave a good reason how manually defined formulas are better than predefined ones. Users usually doesn't care about config specifics they simply need a guaranteed replication to not loose their data. > > > You shouldn't remove replication_synchro_quorum from here. > > > This table lists the options which are set directly from `box_cfg` in > > > specific order. > > No, this table is to _skip_ evaluation on bootup. But we have to verify > > the default value to evaluate. > > > Yes, that's what I'm talking about. > Even if the cfg option from this list is 'skipped' in lua, it's > referenced > directly from box_cfg_xc(). Othervise the `box_cfg_set_...` will be called > twice. > Once from box_cfg_xc(), second time from this lua code. > > To be more verbose, all the setters from dynamic_cfg_skip_at_load are called > on > bootstrap. But from box_cfg_xc() in C, not from Lua. If you remove an entry > from dynamic_cfg_skip_at_load, the corresponding setter will be called > twice. I'll recheck, thanks Serge!
next prev parent reply other threads:[~2020-11-20 12:14 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-19 19:40 [Tarantool-patches] [RFC 0/4] qsync: evaluate replication_synchro_quorum dynamically Cyrill Gorcunov 2020-11-19 19:40 ` [Tarantool-patches] [RFC 1/4] cfg: add cfg_isnumber helper Cyrill Gorcunov 2020-11-20 9:53 ` Serge Petrenko 2020-11-19 19:40 ` [Tarantool-patches] [RFC 2/4] qsync: move synchro quorum update to separate routine Cyrill Gorcunov 2020-11-20 10:06 ` Serge Petrenko 2020-11-20 11:01 ` Cyrill Gorcunov 2020-11-20 11:39 ` Serge Petrenko 2020-11-20 11:47 ` Cyrill Gorcunov 2020-11-19 19:40 ` [Tarantool-patches] [RFC 3/4] cfg: prepare symbolic evaluation of replication_synchro_quorum Cyrill Gorcunov 2020-11-20 10:32 ` Serge Petrenko 2020-11-20 11:34 ` Cyrill Gorcunov 2020-11-20 11:56 ` Serge Petrenko 2020-11-20 12:14 ` Cyrill Gorcunov [this message] 2020-11-26 14:38 ` Mons Anderson 2020-11-26 14:44 ` Cyrill Gorcunov 2020-11-26 16:01 ` Mons Anderson 2020-11-19 19:41 ` [Tarantool-patches] [RFC 4/4] qsync: allow to specify replication_synchro_quorum as a formula Cyrill Gorcunov 2020-11-20 10:50 ` Serge Petrenko 2020-11-20 12:01 ` Cyrill Gorcunov 2020-11-20 12:41 ` Serge Petrenko 2020-11-20 15:00 ` 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=20201120121401.GE875895@grain \ --to=gorcunov@gmail.com \ --cc=sergepetrenko@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [RFC 3/4] cfg: prepare 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