Skip to content

Commit c10e9cc

Browse files
update: propagate new options if fields not exist
If Tarantool older than 2.8.1 [1] was used to update nullable fields, the workaround was executed to perform this operation. If `noreturn` or `fetch_latest_metadata` options were set, they were ignored on storage side before this patch. 1. tarantool/tarantool#3378
1 parent f362a4d commit c10e9cc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crud/update.lua

+3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ local function update_on_storage(space_name, key, operations, field_names, opts)
5959
return res, nil
6060
end
6161

62+
-- Relevant for Tarantool older than 2.8.1.
6263
-- We can only add fields to end of the tuple.
6364
-- If schema is updated and nullable fields are added, then we will get error.
6465
-- Therefore, we need to add filling of intermediate nullable fields.
@@ -68,6 +69,8 @@ local function update_on_storage(space_name, key, operations, field_names, opts)
6869
res, err = schema.wrap_box_space_func_result(space, 'update', {key, operations}, {
6970
add_space_schema_hash = false,
7071
field_names = field_names,
72+
noreturn = opts.noreturn,
73+
fetch_latest_metadata = opts.fetch_latest_metadata,
7174
})
7275
end
7376

0 commit comments

Comments
 (0)