From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 660964696C3 for ; Mon, 23 Mar 2020 09:42:13 +0300 (MSK) References: <1f571d45-179d-1b72-941d-3de21c2e8f11@tarantool.org> <4a6edd2a-7173-706c-0622-a805b152dc70@tarantool.org> From: Oleg Babin Message-ID: <228c747e-13b4-10a1-7626-9ee4ad99567a@tarantool.org> Date: Mon, 23 Mar 2020 09:42:11 +0300 MIME-Version: 1.0 In-Reply-To: <4a6edd2a-7173-706c-0622-a805b152dc70@tarantool.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Language: en-GB Content-Transfer-Encoding: 8bit Subject: Re: [Tarantool-patches] [PATCH vshard 2/2] storage: introduce vshard.storage._call() List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org, yaroslav.dynnikov@tarantool.org Thanks for your answers. Seems I've missed one comment. But LGTM in general. On 22/03/2020 22:13, Vladislav Shpilevoy wrote: >>> + >>> +local function service_call(...) >>> +    local service_name = select(1, ...) >>> +    return service_call_api[service_name](select(2, ...)) >>> +end >> What's about a following diff? ============ diff --git a/vshard/storage/init.lua b/vshard/storage/init.lua index 6aa5d6a..3653914 100644 --- a/vshard/storage/init.lua +++ b/vshard/storage/init.lua @@ -2203,9 +2203,8 @@ service_call_api = setmetatable({ return res end}) -local function service_call(...) - local service_name = select(1, ...) - return service_call_api[service_name](select(2, ...)) +local function service_call(service_name, ...) + return service_call_api[service_name](...) end ============