[PATCH 01/13] vinyl: store tuple comparison hints in memory tree
Vladimir Davydov
vdavydov.dev at gmail.com
Thu Apr 4 12:09:22 MSK 2019
On Thu, Apr 04, 2019 at 11:53:27AM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev at gmail.com> [19/04/02 20:35]:
> > This patch incorporates tuple comparison hints into vy_mem_tree,
> > similarly to how it was done in case of memtx_tree.
> >
> > Apart from speeding up lookups, this is also needed for multikey index
> > support, because multikey indexes will reuse hints to store offsets of
> > indexed array entries.
>
> The patch is OK to push. See one comment below.
>
> > while (!vy_mem_tree_iterator_is_invalid(&itr)) {
> > + struct vy_mem_tree_elem replaced = vy_mem_tree_elem_invalid();
>
> I would use eof or null rather than invalid, e.g.
> vy_mem_tree_iterator_is_eof()
> vy_mem_tree_eof
>
> or:
>
> vy_mem_tree_iterator_is_eof()
> vy_mem_tree_null
I called it 'invalid' to be consistent with the BPS tree API, see
bps_tree_invalid_iterator.
Also, it's used not only for EOF - we set the iterator position to
this value before iteration is started.
That said, I'd rather leave the name as is.
More information about the Tarantool-patches
mailing list