Skip to content
Snippets Groups Projects
Commit 2160e4cb authored by Alexandr Lyapunov's avatar Alexandr Lyapunov Committed by Konstantin Osipov
Browse files

memtx: make tree iterators stable

Make memtx tree iterator lookup lazy - in the first 'next' call.
It makes the iterator similar to vinyl in case when a new tuple
is inserted between a moment of iterator creation and a moment
of first tuple retrieval. Make the inserted tuple visible to
the iterator.

Store last returned tuple in the iterator and if the tree is
changed between iterations - search for the stored tuple and
continue iteration from the found position. This will make the
iteration stable and every next iteration will return proper
(next or previous) tuple.

Fix #1796
parent 22d0c539
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