From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp44.i.mail.ru (smtp44.i.mail.ru [94.100.177.104]) (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 A879A469710 for ; Wed, 10 Jun 2020 12:17:19 +0300 (MSK) Date: Wed, 10 Jun 2020 12:17:18 +0300 From: Sergey Ostanevich Message-ID: <20200610091718.GG50@tarantool.org> References: <20200609125302.279888-3-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200609125302.279888-3-gorcunov@gmail.com> Subject: Re: [Tarantool-patches] [PATCH 2/2] box: use tnt_raise for quorum check List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tml , v.shpilevoy@tarantool.org Hi! Although it's not your part of change - I have a question on the message itself. It should be both greater than and less than same number? I suppose it misses a number after 'greater than' and this number 0? Sergos. On 09 июн 15:53, Cyrill Gorcunov wrote: > All other check routines uses tnt_raise > so no need to introduce a different approach. > > Signed-off-by: Cyrill Gorcunov > --- > src/box/box.cc | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/src/box/box.cc b/src/box/box.cc > index 792c3c394..179feccf6 100644 > --- a/src/box/box.cc > +++ b/src/box/box.cc > @@ -485,9 +485,9 @@ box_check_replication_sync_quorum(void) > { > int quorum = cfg_geti("replication_sync_quorum"); > if (quorum <= 0 || quorum > VCLOCK_MAX) { > - diag_set(ClientError, ER_CFG, "replication_sync_quorum", > - "the value must be greater than and less than " > - "maximal number of replicas"); > + tnt_raise(ClientError, ER_CFG, "replication_sync_quorum", > + "the value must be greater than and less than " > + "maximal number of replicas"); > return -1; > } > return quorum; > @@ -675,8 +675,7 @@ box_check_config() > box_check_replication_connect_timeout(); > box_check_replication_connect_quorum(); > box_check_replication_sync_lag(); > - if (box_check_replication_sync_quorum() < 0) > - diag_raise(); > + box_check_replication_sync_quorum(); > box_check_replication_sync_timeout(); > box_check_readahead(cfg_geti("readahead")); > box_check_checkpoint_count(cfg_geti("checkpoint_count")); > -- > 2.26.2 >