box: reuse formats exported to Lua
Make lbox_tuple_format_new (exported as box.internal.new_tuple_format to Lua) reuse tuple formats. It's safe, because formats exported to Lua are immutable. This fixes a net.box error when one creates/closes a lot of net.box connections: a net.box connection creates a few formats for a local version of the schema so if the garbage collector isn't invoked to clean up after it, Tarantool can run out of format ids. Closes #6217
Showing
- changelogs/unreleased/gh-6217-fix-net-box-connect-error.md 4 additions, 0 deletionschangelogs/unreleased/gh-6217-fix-net-box-connect-error.md
- src/box/lua/misc.cc 1 addition, 1 deletionsrc/box/lua/misc.cc
- test/box/net.box_reuse_tuple_formats_gh-6217.result 46 additions, 0 deletionstest/box/net.box_reuse_tuple_formats_gh-6217.result
- test/box/net.box_reuse_tuple_formats_gh-6217.test.lua 20 additions, 0 deletionstest/box/net.box_reuse_tuple_formats_gh-6217.test.lua
Loading
Please register or sign in to comment