[tarantool-patches] Re: [PATCH v2 3/4] tuple: use global msgpack serializer in Lua tuple

Alexander Turenko alexander.turenko at tarantool.org
Fri Sep 13 02:27:58 MSK 2019


LGTM.

Several questions are below.

I agree that the variant with triggers looks more natural.

Should not we add box_lua_tuple_free() and call trigger_destroy()
inside? I know, we now don't call tarantool_lua_free(), but I hope it
will be fixed someday.

If you'll going to add it, please, add also the call to luaT_tuple_new.c
for the symmetry with box_lua_tuple_init(). It also will help to keep
this test clean from ASAN / Valgrind point of view: I did verify it
aganst one of those tools at the time of writing the test (don't
remember against which of them).

Hm. We don't have box_lua_free() at all. I'm doubtful now.

WBR, Alexander Turenko.

> +static inline void
> +tuple_serializer_fill(void)
> +{
> +	luaL_serializer_copy_options(&tuple_serializer, luaL_msgpack_default);
> +	tuple_serializer.encode_sparse_ratio = 0;
> +}

Is not this name quite common? Maybe tuple_serializer_update_options()?




More information about the Tarantool-patches mailing list