From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id DE3462AFC4 for ; Thu, 28 Mar 2019 10:29:50 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mrvQbEHi_jZg for ; Thu, 28 Mar 2019 10:29:50 -0400 (EDT) Received: from smtp57.i.mail.ru (smtp57.i.mail.ru [217.69.128.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 914A926A8B for ; Thu, 28 Mar 2019 10:29:50 -0400 (EDT) Received: by smtp57.i.mail.ru with esmtpa (envelope-from ) id 1h9W2O-0002HD-Qp for tarantool-patches@freelists.org; Thu, 28 Mar 2019 17:29:49 +0300 Date: Thu, 28 Mar 2019 17:29:48 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 3/6] vinyl: cache iterator: consolidate curr_stmt updates Message-ID: <20190328142948.GC23295@chai> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org * Vladimir Davydov [19/03/26 18:56]: > Currently, vy_cache_iterator->curr_stmt is updated by top-level iterator > functions - next, skip, restore - which results in code duplication and > spreads core logic among multiple places. To reduce the amount of code > and make it generally easier to follow, this patch moves the updates to > low level functions - step, seek. It also makes the seek method return > the stop flag, which makes it similar to step, thus making the code more > consistent. OK to push. As a nit, I would pass stop as an out parameter, not in return value. We may want to use the return value to indicate an error sometime. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov