vinyl: decompose read iterator merge procedure
The generic approach trying to build the merge procedure around the vy_stmt_iterator interface didn't pan out, because sources are way too different: in contrast to other sources, the cache stores intervals; run iterators may yield; txw does not preserve statement history. Let's rewrite vy_read_iterator_next_{key,lsn} in such a way that they do not use this generic interface. This results in a quite bit of code being duplicated, because loops over sources are unrolled, but this is intentional - hopefully it makes the code easier to follow. The patch isn't supposed to change the merge algorithm or remove any optimization implemented in it.
Loading
Please register or sign in to comment