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 6C52F2B03D for ; Thu, 28 Mar 2019 10:39:49 -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 2EELloRF0HJ7 for ; Thu, 28 Mar 2019 10:39:49 -0400 (EDT) Received: from smtp38.i.mail.ru (smtp38.i.mail.ru [94.100.177.98]) (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 1F0E32B077 for ; Thu, 28 Mar 2019 10:39:49 -0400 (EDT) Received: by smtp38.i.mail.ru with esmtpa (envelope-from ) id 1h9WC3-0006gk-7x for tarantool-patches@freelists.org; Thu, 28 Mar 2019 17:39:47 +0300 Date: Thu, 28 Mar 2019 17:39:47 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 5/6] vinyl: run iterator: refactor seek method Message-ID: <20190328143947.GE23295@chai> References: <59095674ca1bd479afa87f38d4088c4738ee940f.1553613748.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59095674ca1bd479afa87f38d4088c4738ee940f.1553613748.git.vdavydov.dev@gmail.com> 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]: > A few changes to make the function more straightforward: > > - Move bloom checking and LSN filtering out of 'do_seek' helper. Make > the helper do just one simple task - lookup the first one in a series > of statements matching the given search criteria. > - Fold iterator type and key substitution in 'seek' method, similarly > to how we did it for other iterators. > - Cleanup EQ checks. Use the original iterator type and key where > appropriate to remove extra checks in calling methods. Don't check EQ > in 'seek' method in case it was checked by 'do_seek'. > - Add some comments. LGTM (same comment re passing EOF in return value applies). eq_found looks cumbersome, perhaps you could both kill bool eq_found and not pass eof in the out parameter of do_seek()? -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov