From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 A410142F4AD for ; Thu, 11 Jun 2020 02:51:07 +0300 (MSK) References: <7ddc4d3a6b45dba38e7bc184d3125c42936fc512.1591701695.git.sergepetrenko@tarantool.org> From: Vladislav Shpilevoy Message-ID: <27b77514-a7c3-f362-814a-e3f36aee9b9a@tarantool.org> Date: Thu, 11 Jun 2020 01:51:06 +0200 MIME-Version: 1.0 In-Reply-To: <7ddc4d3a6b45dba38e7bc184d3125c42936fc512.1591701695.git.sergepetrenko@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 2/8] replication: introduce replication_sync_quorum cfg List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Petrenko , sergos@tarantool.org, gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org Thanks for the review fixes! I applied the new error message, and updated a comment for the option declaration. > commit 1e5fcbe66c23b5371f0422c425c7f19ffecae83b > Author: Serge Petrenko > Date: Wed Jun 10 13:42:16 2020 +0300 > > follow-up fixes > > diff --git a/src/box/box.cc b/src/box/box.cc > index 9b67aeb1f..27be7a7b1 100644 > --- a/src/box/box.cc > +++ b/src/box/box.cc > @@ -481,9 +481,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 zero and less " > + "than maximal number of replicas"); However I kept diag_set instead of tnt_raise. Because I hope this file will become more C gradually. This is why you can already see some box_check_*() functions returning -1 instead of throwing an error. > return -1; > } > return quorum;