From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 F2E3F469719 for ; Thu, 19 Mar 2020 18:34:09 +0300 (MSK) Date: Thu, 19 Mar 2020 18:27:52 +0300 From: Igor Munkin Message-ID: <20200319152752.GM6392@tarantool.org> References: <4bfd55d1ec53a21acd83114ea6bef36c6345c038.1583366981.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4bfd55d1ec53a21acd83114ea6bef36c6345c038.1583366981.git.v.shpilevoy@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 1/2] box: fail in box_check_config() on bad sql cache size List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org Vlad, Thanks for the patch, LGTM. On 05.03.20, Vladislav Shpilevoy wrote: > It was calling box_check_sql_cache_size() assuming that it > throws. But it returns 0/-1. > --- > src/box/box.cc | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/box/box.cc b/src/box/box.cc > index 09dd67ab4..0212f34ad 100644 > --- a/src/box/box.cc > +++ b/src/box/box.cc > @@ -669,7 +669,8 @@ box_check_config() > box_check_memtx_memory(cfg_geti64("memtx_memory")); > box_check_memtx_min_tuple_size(cfg_geti64("memtx_min_tuple_size")); > box_check_vinyl_options(); > - box_check_sql_cache_size(cfg_geti("sql_cache_size")); > + if (box_check_sql_cache_size(cfg_geti("sql_cache_size")) != 0) Side note: I'm just curious what are the rationale to use '!= 0' here and '< 0' nearby in the following patch. > + diag_raise(); > } > > /* > -- > 2.21.1 (Apple Git-122.3) > -- Best regards, IM