-
Notifications
You must be signed in to change notification settings - Fork 15
Use "merger" for fetch&sort tuples on router #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
66fbe72
to
f79d7d1
Compare
9cdf7e5
to
bdad3f4
Compare
4d258f1
to
324e518
Compare
8204e0f
to
52eea03
Compare
https://github.com/tarantool/crud/tree/perf-test Before patch:
After patch:
|
4a674dc
to
6031809
Compare
|
||
function select_module.pairs(space_name, user_conditions, opts) | ||
checks('string', '?table', { | ||
after = '?table|cdata', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to use ?table|tuple
instead of *|cdata
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same for all places where tuple expected.
2efb78d
to
93b5684
Compare
83fff32
to
0714f46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great patch!
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.
For versions where merger is not supported/available yet
(before 1.10.8 and before 2.3.3) we use previous approach with
lua-implemented heap.
Closes #33