vinyl: implement iterator pagination
Pagination for vinyl works exactly like in memtx: the feature is tested by the existing test, which was providently created as multi-engine. The idea is to set vy_read_iterator::last, which is used for restoring the iterator after changes in the LSM-tree structure, to the iterator position provided by the user at the time when the iterator is opened. Note, we can't use vy_read_iterator::last for reporting the current iterator position back to the user, because the iterator is closed on the last iteration so as not to postpone freeing resources until the Lua garbage collector kicks in, so we have to add a new member to the vinyl_iterator struct for storing the current position and update it after each call to vy_read_iterator_next(). Closes #7634 NO_DOC=later NO_CHANGELOG=later
Showing
- src/box/vinyl.c 69 additions, 10 deletionssrc/box/vinyl.c
- src/box/vy_read_iterator.c 7 additions, 6 deletionssrc/box/vy_read_iterator.c
- src/box/vy_read_iterator.h 16 additions, 1 deletionsrc/box/vy_read_iterator.h
- test/engine-luatest/pagination_test.lua 6 additions, 2 deletionstest/engine-luatest/pagination_test.lua
Loading