Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Oleg Babin <olegrok@tarantool.org>,
	tarantool-patches@dev.tarantool.org,
	yaroslav.dynnikov@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH vshard 2/2] storage: introduce vshard.storage._call()
Date: Mon, 23 Mar 2020 23:32:12 +0100	[thread overview]
Message-ID: <e1560612-59ca-5867-ae03-79b73f1c63a7@tarantool.org> (raw)
In-Reply-To: <228c747e-13b4-10a1-7626-9ee4ad99567a@tarantool.org>

On 23/03/2020 07:42, Oleg Babin wrote:
> 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
> ============

Indeed, that looks better. I missed that I could declare
first argument separately. Applied.

      reply	other threads:[~2020-03-23 22:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-21 18:59 [Tarantool-patches] [PATCH vshard 0/2] vshard upgrade and _call Vladislav Shpilevoy
2020-03-21 18:59 ` [Tarantool-patches] [PATCH vshard 1/2] storage: introduce upgrade strategy Vladislav Shpilevoy
2020-03-22  5:05   ` Oleg Babin
2020-03-22 19:12     ` Vladislav Shpilevoy
2020-03-23  6:35       ` Oleg Babin
2020-03-23 22:32         ` Vladislav Shpilevoy
2020-03-24  4:32           ` Oleg Babin
2020-03-24 15:21   ` Yaroslav Dynnikov
2020-03-24 23:44     ` Vladislav Shpilevoy
2020-03-21 18:59 ` [Tarantool-patches] [PATCH vshard 2/2] storage: introduce vshard.storage._call() Vladislav Shpilevoy
2020-03-22  5:08   ` Oleg Babin
2020-03-22 19:13     ` Vladislav Shpilevoy
2020-03-23  6:42       ` Oleg Babin
2020-03-23 22:32         ` Vladislav Shpilevoy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1560612-59ca-5867-ae03-79b73f1c63a7@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=olegrok@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=yaroslav.dynnikov@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH vshard 2/2] storage: introduce vshard.storage._call()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox