Skip to content
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

space_upgrade: fix crashes on upgrading nullability #9907

Merged
merged 1 commit into from
May 22, 2024

Conversation

drewdzzz
Copy link
Contributor

@drewdzzz drewdzzz commented Apr 3, 2024

The patch fixes crashes on upgrading nullability of trailing fields. If we had nullable one, and we upgrade it to non-nullable, attribute has_optional_part of some indexes can be changed (even if no indexed fields are changed). So in order to correctly index both old and new tuples we should set new min_field_count value to the minimal min_field_count of old and new formats. Actual value will be set when space upgrade completes.

This is CE part of the patch. It must be merged after EE part is approved and all tests there are passed.
EE part: tarantool/tarantool-ee#748

Part of tarantool/tarantool-ee#698
Part of tarantool/tarantool-ee#750

@coveralls
Copy link

coveralls commented Apr 3, 2024

Coverage Status

coverage: 87.095% (-0.002%) from 87.097%
when pulling 1351c5d on drewdzzz:space_upgrade_fix
into ab0f791
on tarantool:master
.

@drewdzzz drewdzzz force-pushed the space_upgrade_fix branch 3 times, most recently from b961548 to 40ec462 Compare April 5, 2024 09:07
@drewdzzz drewdzzz changed the title space_upgrade: fix crash space_upgrade: fix crash on upgrading nullability Apr 5, 2024
@drewdzzz drewdzzz added the do not merge Not ready to be merged label Apr 5, 2024
@drewdzzz drewdzzz changed the title space_upgrade: fix crash on upgrading nullability space_upgrade: fix crashes on upgrading nullability Apr 5, 2024
@drewdzzz drewdzzz marked this pull request as ready for review April 5, 2024 12:14
@drewdzzz drewdzzz force-pushed the space_upgrade_fix branch 2 times, most recently from f79bc3d to bc78576 Compare April 5, 2024 13:09
src/box/alter.cc Outdated Show resolved Hide resolved
@drewdzzz drewdzzz force-pushed the space_upgrade_fix branch 2 times, most recently from 7c9d9c2 to 85b381f Compare May 16, 2024 11:39
@drewdzzz drewdzzz requested a review from locker May 16, 2024 18:32
@drewdzzz drewdzzz assigned locker and unassigned drewdzzz May 16, 2024
src/box/alter.cc Outdated Show resolved Hide resolved
src/box/alter.cc Outdated Show resolved Hide resolved
@locker locker assigned drewdzzz and unassigned locker May 17, 2024
@drewdzzz drewdzzz force-pushed the space_upgrade_fix branch 6 times, most recently from 5cc8941 to a8728e7 Compare May 20, 2024 15:01
@drewdzzz drewdzzz requested a review from locker May 21, 2024 10:43
@drewdzzz drewdzzz assigned locker and unassigned drewdzzz May 21, 2024
src/box/alter.cc Outdated Show resolved Hide resolved
When upgrading a space, attribute `has_optional_parts` of indexes can be
changed. So in order to correctly index both old and new tuples we should
set new min_field_count value to the minimal min_field_count of old and
new formats. Actual value will be set when space upgrade completes.

Part of tarantool/tarantool-ee#698
Part of tarantool/tarantool-ee#750

NO_TEST=in ee
NO_CHANGELOG=in ee
NO_DOC=bugfix
@locker locker added full-ci Enables all tests for a pull request and removed do not merge Not ready to be merged labels May 22, 2024
@locker
Copy link
Member

locker commented May 22, 2024

app-luatest/http_client_test.lua failulre in the release_asan_clang workflow is unrelated - the test is known to be flaky.

@locker locker merged commit c449ada into tarantool:master May 22, 2024
92 of 93 checks passed
@locker
Copy link
Member

locker commented May 22, 2024

Cherry-picked to 2.11 and 3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full-ci Enables all tests for a pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants