Skip to content
Snippets Groups Projects
Commit e5291038 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

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`).
parent f9bfa2dc
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment