From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 4BE74469719 for ; Thu, 19 Mar 2020 01:32:52 +0300 (MSK) Date: Thu, 19 Mar 2020 01:26:35 +0300 From: Igor Munkin Message-ID: <20200318222635.GG6392@tarantool.org> References: <20191114115020.21091-1-maria.khaydich@tarantool.org> <1583942274.319390956@f377.i.mail.ru> <20200312132931.GA30900@atlas> <1584041112.66796082@f172.i.mail.ru> <20200312200024.GA11476@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200312200024.GA11476@atlas> Subject: Re: [Tarantool-patches] [PATCH 1/2] box: make box.cfg idempotent function List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Konstantin Osipov Cc: tarantool-patches@dev.tarantool.org Kostja, On 12.03.20, Konstantin Osipov wrote: > * Maria Khaydich [20/03/12 22:26]: > > >> Calling box.cfg{} more than once does not normally cause any errors > > >> (even though it might not have any effect). In contrast, assigning > > >> it to some variable and then using it after the box was configured > > >> caused an error since the method was overwritten by the initial call > > >> of . > > >>   > > >> The patch fixes this issue making box.cfg behave consistently in both > > >> scenarios and is a follow-up for box: make box.execute idempotent function. > > > > > >Did you benchmark it? > >   > > Do you think we need to? There’s basically one extra condition > > in the patch. I don’t see how it might degrade performance. > > It's not a one more condition, it's one more FFI C call. I guess the problem have to be fixed anyway. However you might suggest another fix for the issue? There are several other ways to indicate whether box is configured, e.g. introduce the specific value to the box table. What do you think? I see for now box.cfg call as not the one performance critical, but I might be missing something you see. It would be great if you detailed a bit your proposal regarding the fix and its benchmarks. > > -- > Konstantin Osipov, Moscow, Russia -- Best regards, IM