vinyl: write_iterator merges vlsns subsequnces
Now write iterator see only oldest vlsn. Because of it the write iterator can not skip or merge or squash newer statements, even if they are not used by any transactions. For example, consider one key and its lsns: LSNs: 10 20 30 40 50 Read Views: * * * Statements with lsn 40 can be merged with 50; 20 can be merged with 30. Old write iterator will merge nothing in that case, because there is oldest vlsn = 10. Lets allow the write iterator to see all read views, instead of only oldest. Such write iterator can merge multiple lsns subsequences of each key. For the example above it will merge in the following way: LSNs: 10 20 30 40 50 Read Views: * * * Merge and \__/\_________/\________/ return: merge, merge, merge and return each merged result. For the considered case the difference is 3 result statements instead of 5 by the old write iterator. Closes #1920 Closes #2502 Closes #1824 Closes #2578
Showing
- src/box/vinyl.c 5 additions, 3 deletionssrc/box/vinyl.c
- src/box/vy_run.c 12 additions, 15 deletionssrc/box/vy_run.c
- src/box/vy_stmt.h 26 additions, 0 deletionssrc/box/vy_stmt.h
- src/box/vy_write_iterator.c 490 additions, 126 deletionssrc/box/vy_write_iterator.c
- src/box/vy_write_iterator.h 98 additions, 98 deletionssrc/box/vy_write_iterator.h
- test/unit/CMakeLists.txt 3 additions, 0 deletionstest/unit/CMakeLists.txt
- test/unit/vy_iterators_helper.c 176 additions, 0 deletionstest/unit/vy_iterators_helper.c
- test/unit/vy_iterators_helper.h 139 additions, 0 deletionstest/unit/vy_iterators_helper.h
- test/unit/vy_write_iterator.c 418 additions, 0 deletionstest/unit/vy_write_iterator.c
- test/unit/vy_write_iterator.result 39 additions, 0 deletionstest/unit/vy_write_iterator.result
Loading
Please register or sign in to comment