vinyl: use vinyl iterators virtuality to remove 'if' in next()
The first reason of the patch is that vinyl iterators are virtual already, and 'if's about constant index attributes (like index->id) can be replaced by new next() implementation. Now in next() index->id is checked to detect necessity of primary index lookup. Lets split next() in 2 functions: primary_next() and secondary_next() to remove 'if'. The second reason, that in #2129 logic of secondary index lookup complicates a lot. For example, there is raw idea to do not add statements into a cache before looking up in a primary index, because after #2129 any tuple, read from a secondary index, can be dirty. Needed for #2129
Loading
Please register or sign in to comment