Fix iproto index name to ID mapping#10902
Conversation
64492da to
ac51970
Compare
drewdzzz
left a comment
There was a problem hiding this comment.
Thanks for the patch! See my comments below.
Regarding commit message:
Header:
- Do not use capital letter after the category name (
Correct->correct) - Let's replace word "correct" with "fix" - "correct" is often used as an adjective and "fix" is always a verb.
Body:
- Please, do not use multiple spaces between sentences.
- I would rephrase it in such way: explain the problem (that Tarantool resolved name to dense id but Tarantool requests actually expect id observed by user -
index->def->iid) and after that something like "The commit fixed this problem". What's about the current message - it's still not clear why you replaceddense_idwithindex->def->iid. - "fail due to incorrect index ID resolution when fetch_schema was false" - did you check it? Does it really works with
fetch_schema = true?
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
92520c0 to
2eee83a
Compare
drewdzzz
left a comment
There was a problem hiding this comment.
Thanks for the fixes!
I have no objections regarding the fix, commit message and changelog. Let's just slightly improve the test.
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
2eee83a to
6859c1f
Compare
31a9d1f to
ac51730
Compare
drewdzzz
left a comment
There was a problem hiding this comment.
Thanks for the fixes! Looks good, just a few nitpicks.
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
ac51730 to
a40756f
Compare
drewdzzz
left a comment
There was a problem hiding this comment.
Thanks for the patch, LGTM!
CuriousGeorgiy
left a comment
There was a problem hiding this comment.
Hey Maria, nice to meet you! Great first patch to start your Tarantool journey!
I have left some comments below regarding polishing of the test. These comments are mostly nitpicks, lifehacks, tricks and conventional Tarantool wisdom.
Please expect a lot of them in the beginning of your journey — they do not in any way diminish your hard skills, their goal is rather to calibrate you to our development traditions and expectations.
changelogs/unreleased/gh-9923-fix-invalid-iproto-name-mapping-on-the-server-side.md
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
33eda19 to
15d5e2d
Compare
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
test/box-luatest/gh_9923_invalid_iproto_index_name_mapping_on_the_server_side_test.lua
Outdated
Show resolved
Hide resolved
15d5e2d to
770973b
Compare
Previously, index names were resolved to dense IDs, which caused failures when accessing indexes by name. This happened because the index_map lookup expected user-visible IDs (index->def->iid), not dense IDs. The fix replaces dense_id with index->def->iid to ensure correct mapping of index names to their numeric IDs. Closes tarantool#9923 NO_DOC=bug fix
770973b to
524976b
Compare
iproto: fix IPROTO index name to ID mapping
Previously, index names were resolved to dense IDs, which caused
failures when accessing indexes by name. This happened because the
index_map lookup expected user-visible IDs (index->def->iid), not dense IDs.
The fix replaces dense_id with index->def->iid to ensure correct mapping
of index names to their numeric IDs, aligning with the expected behavior
when accessing indexes by name.
Closes #9923