[PATCH v4 0/4] Merger

Alexander Turenko alexander.turenko at tarantool.org
Wed May 8 01:30:44 MSK 2019


Changes since v3:

- Renamed decode_{array,map}() to decode_{array,map}_header().
- Clarified skip_header option with an example in the docbot comment.
- Dropped merger_context both from C and Lua.
- Eliminated pointless casts after malloc().
- Renamed merger source to merge source.
- Renamed <object>s_count to <object>_count.
- A buffer source now checks input msgpack (uses mp_check()).
- Fixed a source chunk validation, added test cases.
- Eliminated box_* types and functions where possible.
- Added merge_source_next() helper.
- Made base source functions static inline.
- Moved sources setting into the merger constructor.
- Removed dead code from merge_source_less().
- Create a source with refs == 1.
- Don't reallocate tuples.
- Rebased on top of the new master.
- Naming, comments and other minor changes suggested by Vladimir.
- Updated examples repo and usage in graphql.

More information about these changes can be found in review for 3rd
version of the patchset:

https://www.freelists.org/post/tarantool-patches/PATCH-v3-47-lua-add-nonrecursive-msgpack-decoding-functions,6
https://www.freelists.org/post/tarantool-patches/PATCH-v3-57-netbox-add-skip-header-option-to-use-with-buffer,4
https://www.freelists.org/post/tarantool-patches/PATCH-v3-67-Add-merger-for-tuples-streams-C-part,7
https://www.freelists.org/post/tarantool-patches/PATCH-v3-77-Add-merger-for-tuple-streams-Lua-part,7

More documentation and usage examples:
https://github.com/Totktonada/tarantool-merger-examples

issue: https://github.com/tarantool/tarantool/issues/3276
branch: https://github.com/tarantool/tarantool/tree/Totktonada/gh-3276-on-board-merger

Alexander Turenko (4):
  lua: add non-recursive msgpack decoding functions
  net.box: add skip_header option to use with buffer
  Add merger for tuples streams (C part)
  Add merger for tuple streams (Lua part)

 src/box/CMakeLists.txt        |    3 +
 src/box/lua/init.c            |    7 +-
 src/box/lua/merger.c          | 1143 +++++++++++++++++++++++++++++++++
 src/box/lua/merger.h          |   47 ++
 src/box/lua/merger.lua        |   41 ++
 src/box/lua/net_box.lua       |   56 +-
 src/box/merger.c              |  355 ++++++++++
 src/box/merger.h              |  150 +++++
 src/lua/msgpack.c             |   82 +++
 test/app-tap/msgpack.test.lua |  182 +++++-
 test/box-tap/merger.test.lua  |  768 ++++++++++++++++++++++
 test/box/net.box.result       |  222 ++++++-
 test/box/net.box.test.lua     |   86 ++-
 test/unit/CMakeLists.txt      |    3 +
 test/unit/merger.result       |   71 ++
 test/unit/merger.test.c       |  285 ++++++++
 16 files changed, 3468 insertions(+), 33 deletions(-)
 create mode 100644 src/box/lua/merger.c
 create mode 100644 src/box/lua/merger.h
 create mode 100644 src/box/lua/merger.lua
 create mode 100644 src/box/merger.c
 create mode 100644 src/box/merger.h
 create mode 100755 test/box-tap/merger.test.lua
 create mode 100644 test/unit/merger.result
 create mode 100644 test/unit/merger.test.c

-- 
2.21.0




More information about the Tarantool-patches mailing list