-
Notifications
You must be signed in to change notification settings - Fork 14
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
Tuple merger incompatibility fixes needed for tarantool/tarantool#8147 #390
Tuple merger incompatibility fixes needed for tarantool/tarantool#8147 #390
Conversation
c166792
to
afd0918
Compare
.github/workflows/reusable_test.yml
Outdated
@@ -37,6 +37,9 @@ jobs: | |||
- name: Install metrics |
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.
Have you considered removing external merger install at all?
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.
No, this wasn't considered in discussion with @Totktonada. I guess the external tuple merger exists for compatibility reasons so that crud can work with older Tarantool versions which do not have an embedded tuple merger. But I don't think that manually forcing the installation of the external tuple key definition and tuple merger modules is correct.
Right now I am having problems understanding how to remove the external tuple meger manually for go-tarantool and tarantool-python integration workflows, so I would really like to go this way (opting out of forcefully installing the external tuple merger), but I guess it would require patching CI with older Tarantool versions.
/cc @Totktonada
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.
Shouldn't unlocking version dependency (aka install latest tuple-merger and tuple-keydef) solve the issue?
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.
AFAIC, the external tuple merger is currently outdated (correct me @Totktonada), and it would require a separate effort to update it.
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.
Isn't built-in one is preferred over external one on require
nonetheless? It's not an override rock
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.
I guess not, otherwise, why would we need to explicitly Remove external merger if needed
in some workflow runs?
crud/.github/workflows/test_on_push.yaml
Lines 105 to 107 in 588c215
- name: Remove external merger if needed | |
if: ${{ matrix.remove-merger }} | |
run: rm .rocks/lib/tarantool/tuple/merger.so |
But this is another way we could go (i.e., make the embedded merger preferrable).
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.
AFAIC, the external tuple merger is currently outdated (correct me @Totktonada)
It is on track with the built-in merger. There are problems in CI, though.
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.
I think that it is good to decouple @CuriousGeorgiy's task from code health effort in crud
.
I also think that if reducing dependencies in the integration testing workflow helps to run crud
's testing in tarantool
's testing (and others), it is OK to do.
My thoughts regarding the code health activities are in #365.
Feel free to engage me into a voice discussion if needed.
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.
Added a commit that drops external tuple merger and tuple keydef modules installation, as we discussed.
afd0918
to
b7de7b2
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.
It still isn't enough for tests to pass:
https://github.com/tarantool/crud/actions/runs/6572650221/job/17854170027?pr=392
1) select.backend:"vshard".engine:"memtx".test_select_safety_too_low_limit
...t/github/tarantool/crud/test/integration/select_test.lua:164: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x557849c87a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:164: in function 'select.backend:"vshard".engine:"memtx".test_select_safety_too_low_limit'
...
[C]: in function 'xpcall'
2) select.backend:"vshard".engine:"memtx".test_select_safety_max_negative_limit
...t/github/tarantool/crud/test/integration/select_test.lua:164: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x557849c87a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:164: in function 'select.backend:"vshard".engine:"memtx".test_select_safety_max_negative_limit'
...
[C]: in function 'xpcall'
3) select.backend:"vshard".engine:"memtx".test_negative_first
...t/github/tarantool/crud/test/integration/select_test.lua:311: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x557849c87a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:311: in function 'select.backend:"vshard".engine:"memtx".test_negative_first'
...
[C]: in function 'xpcall'
4) select.backend:"vshard".engine:"memtx".test_negative_first_with_batch_size
...t/github/tarantool/crud/test/integration/select_test.lua:506: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x557849c87a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:506: in function 'select.backend:"vshard".engine:"memtx".test_negative_first_with_batch_size'
...
[C]: in function 'xpcall'
5) select.backend:"vshard".engine:"memtx".test_composite_primary_index
...t/github/tarantool/crud/test/integration/select_test.lua:1018: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.after_tuple to nil (?table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x557849c87a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.after_tuple to nil (?table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:1018: in function 'select.backend:"vshard".engine:"memtx".test_composite_primary_index'
...
[C]: in function 'xpcall'
6) select.backend:"vshard".engine:"memtx".test_multipart_primary_index
...t/github/tarantool/crud/test/integration/select_test.lua:1173: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.after_tuple to nil (?table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x557849c87a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.after_tuple to nil (?table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:1173: in function 'select.backend:"vshard".engine:"memtx".test_multipart_primary_index'
...
[C]: in function 'xpcall'
7) select.backend:"vshard".engine:"memtx".test_jsonpath_index_field_pagination
...t/github/tarantool/crud/test/integration/select_test.lua:1718: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.after_tuple to nil (?table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x557849c87a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.after_tuple to nil (?table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:1718: in function 'select.backend:"vshard".engine:"memtx".test_jsonpath_index_field_pagination'
...
[C]: in function 'xpcall'
8) select.backend:"vshard".engine:"vinyl".test_select_safety_too_low_limit
...t/github/tarantool/crud/test/integration/select_test.lua:164: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x5633e25b4a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:164: in function 'select.backend:"vshard".engine:"vinyl".test_select_safety_too_low_limit'
...
[C]: in function 'xpcall'
9) select.backend:"vshard".engine:"vinyl".test_select_safety_max_negative_limit
...t/github/tarantool/crud/test/integration/select_test.lua:164: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x5633e25b4a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:164: in function 'select.backend:"vshard".engine:"vinyl".test_select_safety_max_negative_limit'
...
[C]: in function 'xpcall'
10) select.backend:"vshard".engine:"vinyl".test_negative_first
...t/github/tarantool/crud/test/integration/select_test.lua:311: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x5633e25b4a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:311: in function 'select.backend:"vshard".engine:"vinyl".test_negative_first'
...
[C]: in function 'xpcall'
11) select.backend:"vshard".engine:"vinyl".test_negative_first_with_batch_size
...t/github/tarantool/crud/test/integration/select_test.lua:506: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x5633e25b4a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.scan_value to nil (table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:506: in function 'select.backend:"vshard".engine:"vinyl".test_negative_first_with_batch_size'
...
[C]: in function 'xpcall'
12) select.backend:"vshard".engine:"vinyl".test_composite_primary_index
...t/github/tarantool/crud/test/integration/select_test.lua:1018: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.after_tuple to nil (?table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x5633e25b4a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.after_tuple to nil (?table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:1018: in function 'select.backend:"vshard".engine:"vinyl".test_composite_primary_index'
...
[C]: in function 'xpcall'
13) select.backend:"vshard".engine:"vinyl".test_multipart_primary_index
...t/github/tarantool/crud/test/integration/select_test.lua:1173: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.after_tuple to nil (?table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x5633e25b4a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.after_tuple to nil (?table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:1173: in function 'select.backend:"vshard".engine:"vinyl".test_multipart_primary_index'
...
[C]: in function 'xpcall'
14) select.backend:"vshard".engine:"vinyl".test_jsonpath_index_field_pagination
...t/github/tarantool/crud/test/integration/select_test.lua:1718: expected: nil, actual: {
class_name = "SelectError",
err = "...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.after_tuple to nil (?table expected, got cdata)",
file = "...ment/github/tarantool/crud/crud/common/sharding/init.lua",
line = 183,
stack = "stack traceback:\
\9...ment/github/tarantool/crud/crud/common/sharding/init.lua:183: in function <...ment/github/tarantool/crud/crud/common/sharding/init.lua:168>\
\9[C]: in function 'xpcall'\
\9.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:145: in function <.../github/tarantool/crud/.rocks/share/tarantool/errors.lua:139>\
\9[C]: in function 'pcall'\
\9...gy/Development/github/tarantool/crud/crud/stats/init.lua:411: in function <...gy/Development/github/tarantool/crud/crud/stats/init.lua:402>\
\9[C]: at 0x5633e25b4a70",
str = "SelectError: ...georgy/Development/github/tarantool/crud/crud/select.lua:33: bad argument opts.after_tuple to nil (?table expected, got cdata)",
}
stack traceback:
...t/github/tarantool/crud/test/integration/select_test.lua:1718: in function 'select.backend:"vshard".engine:"vinyl".test_jsonpath_index_field_pagination'
...
[C]: in function 'xpcall'
Ran 1597 tests in 264.879 seconds, 1583 succeeded, 14 failed, 2249 skipped
b7de7b2
to
a66c005
Compare
crud/select.lua
Outdated
if box.tuple.is(opts.after_tuple) then | ||
opts.after_tuple = opts.after_tuple:totable() | ||
end | ||
end |
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.
Is it okay that we modify the options table here, or should I make a copy of it?
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 is fine to modify options table here. First, it's already a copy since it has been transferred over netbox. Second, this opts
is some internal table that was created by crud
itself, so it fine to change it (even if we don't).
The other question is do we really have to totable
this one? If the only reason is checks
(dev_checks
), then you can simply use ?table|cdata
here.
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.
I think we also need to cover external API here:
crud/crud/select/compat/select_old.lua
Line 421 in 588c215
after = '?table', |
crud/crud/select/compat/select_old.lua
Line 228 in 588c215
after = '?table', |
(compat/select.lua
already covers this, compat/select_old.lua
not cover it yet.)
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.
I think we also need to cover external API here:
AFAIC, crud's embedded tuple merger can only be used with Tarantool 1.10, which will never have tuples over IPROTO, so we don't need to bother about it.
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.
Well, ok
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 other question is do we really have to
totable
this one? If the only reason ischecks
(dev_checks
), then you can simply use?table|cdata
here.
I also considered this, but I preferred conversion, because we can't check the cdata
specific type. Though if this function is only internal, I guess it would be fine (but then why do we do the type checking there in the first place?) — leaving this is up to you.
I am also not sure that passing the cdata
down won't require patching a lot of other places downstream. If you insist, I can investigate that.
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.
because we can't check the cdata specific type
It's fine since we don't check table specific type either (we expect an array, but may receive a map).
I am also not sure that passing the cdata down won't require patching a lot of other places downstream.
Try to patch only dev_checks
first. If there are any more changes required that are more than two minutes of work, let's stick to your implementation.
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.
Looks like it works and we can proceed with your solution.
@DifferentialOrange testing against tarantool/tarantool#8630 now passes. |
a66c005
to
e6f24f2
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.
No objections from my side.
crud/select.lua
Outdated
if box.tuple.is(opts.after_tuple) then | ||
opts.after_tuple = opts.after_tuple:totable() | ||
end | ||
end |
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 is fine to modify options table here. First, it's already a copy since it has been transferred over netbox. Second, this opts
is some internal table that was created by crud
itself, so it fine to change it (even if we don't).
The other question is do we really have to totable
this one? If the only reason is checks
(dev_checks
), then you can simply use ?table|cdata
here.
crud/select.lua
Outdated
if box.tuple.is(opts.after_tuple) then | ||
opts.after_tuple = opts.after_tuple:totable() | ||
end | ||
end |
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.
I think we also need to cover external API here:
crud/crud/select/compat/select_old.lua
Line 421 in 588c215
after = '?table', |
crud/crud/select/compat/select_old.lua
Line 228 in 588c215
after = '?table', |
(compat/select.lua
already covers this, compat/select_old.lua
not cover it yet.)
Crud requires a tuple merger to work, and it currently works with three kinds of mergers: an embedded Tarantool one, an external one, and a crud embedded one. The latter implementation is suboptimal but does not depend on any additional symbols. The external merger replicates Tarantool's embedded merger, and serves two purposes: 1. Bring tuple merging to Tarantool 1.10 which does not have an embedded merger. 2. Allows for versioning the merger module independently from Tarantool. Because of potential symbol dependency conflicts, the external merger is installed in a hacky way, which didn't actually work when crud is built as part of another rockspec. Since Tarantool 1.10 can work with the merger embedded to crud, there is no need in pulling an external merger, so let's drop this dependency. Instead, add a CI matrix case with external merger installation to test against it. All written above also applies to the tuple keydef module. Needed for tarantool/tarantool#8147
In scope of tarantool/tarantool#8147, a new context-dependent extension for box tuples, `MP_TUPLE`, is introduced, and the IPROTO data response is extended with a new `IPROTO_TUPLE_FORMATS` field with tuples formats necessary for decoding `MP_TUPLE` sent in the `IPROTO_DATA` field. If the tuple merger's buffer source is used, raw MsgPack is received (see also d18ad41). We expect the response to only contain an `IPROTO_DATA` field, so the occurrence of a new `IPROTO_TUPLE_FORMATS` field breaks this assumption. The `IPROTO_DATA` field is still decoded correctly, but the input buffer's position now points to the `IPROTO_TUPLE_FORMATS` field instead of the end of the response. Instead of handling the issue described above we decided to opt for a simpler solution, namely, using the `skip_header` option of the `net.box` connection's API, which returns only the `IPROTO_DATA` field's value, which is what we are looking for. This option is was introduced in tarantool/tarantool@1aaf637870 (2.2.0 release), but since the issue described above can only occur with the latest Tarantool version, we can safely fallback to manually decoding the `IPROTO_DATA` header on old Tarantool versions. Needed for tarantool/tarantool#8147
e6f24f2
to
7dd8b82
Compare
2c9b292
to
861c90c
Compare
In scope of tarantool/tarantool#8147, box tuples returned from remote procedure calls our now encoded as a new extension, `MP_TUPLE`, and, as, the results of such calls are now decoded as box tuples, i.e., cdata. For compatibility with this feature, we need to allow tuple fields of select options, which are returned from a remote procedure calls, to be cdata in option type checks. Needed for tarantool/tarantool#8147
5596c9d
to
61a871a
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.
Thank you for your patch!
Overview This release introduces various fixes for future Tarantool 3 patches related to tuples over network. Changes * Dropped external tuple merger and tuple keydef modules installation from the package build (#390). Fixes * Compatibility with Tarantool 3.0 binary protocol change (#390). * Compatibility with Tarantool 3.0 tuple objects (#390).
Overview This release introduces various fixes for future Tarantool 3 patches related to tuples over network. Changes * Dropped external tuple merger and tuple keydef modules installation from the package build (#390). Fixes * Compatibility with Tarantool 3.0 binary protocol change (#390). * Compatibility with Tarantool 3.0 tuple objects (#390).
This patchset brings further tuple merger incomptability fixes (see also d18ad41).
Needed for tarantool/tarantool#8147