From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0D28B207C0 for ; Thu, 12 Sep 2019 19:28:16 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hk-utFqVcL8S for ; Thu, 12 Sep 2019 19:28:15 -0400 (EDT) Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [94.100.177.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id C1EA8207A1 for ; Thu, 12 Sep 2019 19:28:15 -0400 (EDT) Date: Fri, 13 Sep 2019 02:27:58 +0300 From: Alexander Turenko Subject: [tarantool-patches] Re: [PATCH v2 3/4] tuple: use global msgpack serializer in Lua tuple Message-ID: <20190912232758.qvb3kloft3ngv6fj@tkn_work_nb> References: <98110cbc514cb13f3ba3b298ed5b6a493fcc36e5.1568055477.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <98110cbc514cb13f3ba3b298ed5b6a493fcc36e5.1568055477.git.v.shpilevoy@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org 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()?