tuple: use global msgpack serializer in Lua tuple
Tuple is a C library exposed to Lua. In Lua to translate Lua objects into tuples and back luaL_serializer structure is used. In Tarantool we have several global serializers, one of which is for msgpack. Tuples store data in msgpack, and in theory should have used that global msgpack serializer. But in fact the tuple module had its own private serializer because of tuples encoding specifics such as never encode sparse arrays as maps. This patch makes tuple Lua module use global msgpack serializer always. But how does tuple handle sparse arrays now? In fact, the tuple module still has its own serializer, but it is updated each time when the msgpack serializer is changed. Part of #4434 (cherry picked from commit 676369b1)
Showing
- src/box/lua/tuple.c 25 additions, 8 deletionssrc/box/lua/tuple.c
- src/lua/utils.c 10 additions, 2 deletionssrc/lua/utils.c
- src/lua/utils.h 26 additions, 0 deletionssrc/lua/utils.h
- test/box/tuple.result 46 additions, 0 deletionstest/box/tuple.result
- test/box/tuple.test.lua 21 additions, 0 deletionstest/box/tuple.test.lua
Loading
Please register or sign in to comment