Skip to content
Snippets Groups Projects
Commit 7675313a authored by Vladimir Davydov's avatar Vladimir Davydov
Browse files

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.
parent 8cb06ffe
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment