Skip to content

Commit d18ad41

Browse files
CuriousGeorgiyDifferentialOrange
authored andcommitted
crud: store the cursor's after_tuple explicitly as a Lua table
In scope of tarantool/tarantool#8147, a new context-dependent extension for box tuples, `MP_TUPLE`, is introduced. If the merger's buffer source is used, raw MsgPack is received, which does not allow for passing the context required for decoding `MP_TUPLE`. At the same time, all box tuples are now encoded as `MP_TUPLE` by default. If the merger's tuple chunk can be decoded by manually skipping the extension header of `MP_TUPLE` and the tuple format of individual tuples, the cursor is decoded using the Lua `msgpack` library, which cannot handle `MP_TUPLE`s without a decoding context. The cursor's `after_tuple` field is a box tuple, so in order to overcome the limitation above, we need to explicitly convert it to a Lua table. Needed for tarantool/tarantool#8147
1 parent bbe1bd5 commit d18ad41

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crud/readview.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ local function select_readview_on_storage(space_name, index_id, conditions, opts
168168
cursor.is_end = true
169169
else
170170
local last_tuple = resp.tuples[#resp.tuples]
171-
cursor.after_tuple = last_tuple
171+
cursor.after_tuple = last_tuple:totable()
172172
end
173173

174174
cursor.stats = {

crud/select.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ local function select_on_storage(space_name, index_id, conditions, opts)
9999
cursor.is_end = true
100100
else
101101
local last_tuple = resp.tuples[#resp.tuples]
102-
cursor.after_tuple = last_tuple
102+
cursor.after_tuple = last_tuple:totable()
103103
end
104104

105105
cursor.stats = {

0 commit comments

Comments
 (0)