From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 28 Mar 2019 17:50:40 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] Re: [PATCH 4/6] vinyl: run iterator: zap search_ended flag Message-ID: <20190328145040.wuq2b26bhkoyub4l@esperanza> References: <20ea713162290b1ef76bb3f999f28f4073d26baf.1553613748.git.vdavydov.dev@gmail.com> <20190328143518.GD23295@chai> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190328143518.GD23295@chai> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Thu, Mar 28, 2019 at 05:35:18PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [19/03/26 18:56]: > > It's equivalent to (itr->search_started && itr->curr_stmt == NULL). > > OK to push, but same as in the previous patch, I would not use the > return value for anything but success/error. We already have a > boolean parameter 'equal found', we could turn it into a enum, > since 'equal found' and 'eof' are mutually exclusive. Returning 1 is consistent with vy_mem_iterator behavior. Other vy_run_iterator functions stick to this convention, too. Yeah, it looks rather awkward, but I think we'd better clean it up in a separate patch. I'll look what we can do about it.