vinyl: do not use restore callback for restarting read iterator
The read iterator has to restart (i.e. reopen all its sources) from the position last returned to the caller when the current range or the whole range tree changes as a result of dump or compaction. To reposition the iterator, we use vy_stmt_iterator_iface->restore callback, which was initially designed to restore an individual merge source (txw, mem, or cache) after a statement is added to or removed from it. Abusing the callback like that complicates its implementation as well as the read iterator itself. We can avoid that by simply reopening merge sources with the proper key when we need to restart the read iterator.
Loading
Please register or sign in to comment