From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 2154E469710 for ; Wed, 25 Nov 2020 15:46:06 +0300 (MSK) References: <20201124152405.1174898-1-gorcunov@gmail.com> <20201124152405.1174898-3-gorcunov@gmail.com> <248e1a42-c948-89ca-7894-251583c33246@tarantool.org> <20201125121256.GN875895@grain> From: Serge Petrenko Message-ID: Date: Wed, 25 Nov 2020 15:46:04 +0300 MIME-Version: 1.0 In-Reply-To: <20201125121256.GN875895@grain> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-GB 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: Cyrill Gorcunov Cc: tml , Vladislav Shpilevoy 25.11.2020 15:12, Cyrill Gorcunov пишет: > On Wed, Nov 25, 2020 at 03:04:07PM +0300, Serge Petrenko wrote: >> Just noticed. Looks like this diag_set and the one below are ignored: >> ``` >> tarantool> a=string.rep('n', 1000) >> --- >> ... >> >> tarantool> box.cfg{replication_synchro_quorum=a} >> --- >> - error: 'Incorrect value for option ''replication_synchro_quorum'': the >> value must >>     be greater than zero and less than maximal number of replicas' >> ... > Indeed. Actually if you remember I've been using errno for such errors. > Now we either should call diag_log() right after diag_set or return > errno handling? Why? Every time eval returns a value < 0 this means an error. Just add a check to check_replication_synchro_quorum. eval's return value is ignored here, and diag is rewritten with an unrelated error. -- Serge Petrenko