box: decrement BOX_SPACE_MAX
Currently, BOX_SPACE_MAX equals BOX_ID_NIL, which is used as an error indicator in the box C API. As a result, if box_space_id_by_name() returns BOX_ID_NIL, it's impossible to figure out whether there's no space with the give name or the space exists and has the id equal to BOX_SPACE_MAX. Let's decrement BOX_SPACE_MAX to fix this issue. Since this may break recovery, let's also introduce the new compatibility module option `box_space_max` to allow the user revert to the old behavior. Closes #9118 @TarantoolBot document Title: Document `compat.box_space_max` Please create an entry for the new compatibility module option at https://tarantool.io/compat/box_space_max. `compat.box_space_max` sets the max space id (`box.schema.SPACE_MAX`). The old limit is 2147483647. The new limit is 2147483646. The limit was decremented because the old value is used as an error indicator in the box C API (it equals `BOX_ID_NIL`).
Showing
- changelogs/unreleased/gh-9118-box-space-max.md 6 additions, 0 deletionschangelogs/unreleased/gh-9118-box-space-max.md
- src/box/schema_def.c 8 additions, 0 deletionssrc/box/schema_def.c
- src/box/schema_def.h 3 additions, 1 deletionsrc/box/schema_def.h
- src/lua/compat.lua 14 additions, 0 deletionssrc/lua/compat.lua
- test/box-luatest/fully-temporary_spaces_test.lua 1 addition, 2 deletionstest/box-luatest/fully-temporary_spaces_test.lua
- test/box-luatest/gh_8036_create_space_with_explicit_and_implicit_id_test.lua 2 additions, 2 deletions..._8036_create_space_with_explicit_and_implicit_id_test.lua
- test/box-luatest/gh_9118_space_max_test.lua 49 additions, 0 deletionstest/box-luatest/gh_9118_space_max_test.lua
- test/box/alter_limits.result 1 addition, 1 deletiontest/box/alter_limits.result
Loading
Please register or sign in to comment