Skip to content

Commit ed0b924

Browse files
olegrokdokshina
andcommitted
Use merger module to fetch and sort tuples on router
Before this patch we used hand-crafted heap to sort tuples on router. This patch removes it and changes to "merger" module written in C. "Merger" is available since Tarantool 2.2. Later "tuple-merger" was introduced it's a version that is compatible with some Tarantool 1.10 versions. In fact support several Tarantool versions is quite complex task. Some msgpack helpers is not avaliable in Tarantool 1.10 to solve this problem small compatibility lawer is implemented. Also "tuple-keydef" doesn't support collation_id options and it's not so for built-in "key_def" module. We need to normalize index parts and change "collation_id" to "collation" when create "key_def" instance. Closes #33 Co-authored-by: Elizaveta Dokshina <[email protected]>
1 parent 7e91fb9 commit ed0b924

14 files changed

+341
-583
lines changed

.github/workflows/test_on_push.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
run: |
2222
curl -L https://tarantool.io/installer.sh | sudo VER=${{ matrix.tarantool-version }} bash
2323
sudo apt install -y tarantool-dev
24+
tarantool --version
2425
./deps.sh
2526
2627
- name: Run linter
@@ -46,6 +47,7 @@ jobs:
4647
rm -f tarantool-enterprise-bundle-${{ matrix.bundle_version }}.tar.gz
4748
sudo cp tarantool-enterprise/tarantool /usr/bin/tarantool
4849
source tarantool-enterprise/env.sh
50+
tarantool --version
4951
./deps.sh
5052
5153
- name: Run linter

CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,9 @@ install(
2828
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cartridge
2929
DESTINATION ${TARANTOOL_INSTALL_LUADIR}
3030
)
31+
32+
# Don't include to rockspec as some Tarantool versions (e.g. 2.2 and 2.3)
33+
# don't have symbols required by "tuple-merger" and "tuple-keydef" modules.
34+
execute_process(
35+
COMMAND bash "-c" "tarantoolctl rocks install tuple-merger 0.0.1"
36+
)

crud/common/heap.lua

-118
This file was deleted.

0 commit comments

Comments
 (0)