Tarantool development patches archive
 help / color / mirror / Atom feed
From: Oleg Babin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH vshard 1/2] router: wrap is_async futures completely
Date: Fri, 1 Oct 2021 09:38:58 +0300	[thread overview]
Message-ID: <bf551af8-4fb7-aefb-7906-f6d2fefe25ce@tarantool.org> (raw)
In-Reply-To: <2787659c-f3fc-7552-6762-9fa78f883764@tarantool.org>

Hi! Thanks for your changes. LGTM.

On 01.10.2021 01:39, Vladislav Shpilevoy wrote:
> Hi! Thanks for the review!
>
> On 29.09.2021 08:18, Oleg Babin wrote:
>> Thanks for your patch! I left three comments below.
>>
>> On 29.09.2021 02:08, Vladislav Shpilevoy wrote:
>>> Router used to override :result() method of netbox futures. It is
>>> needed because user functions are called via vshard.storage.call()
>>> which returns some metadata - it must be truncated before
>>> returning the user's data.
>>>
>>> It worked fine while netbox futures were implemented as tables.
>>> But in the newest Tarantool most of netbox state machine code is
>>> moved into C. The futures now are cdata.
>> AFAIK userdata (not cdata) if it makes sense.
> Changed to 'C structs'.
>
>>> diff --git a/vshard/router/init.lua b/vshard/router/init.lua
>>> index 3d468f3..42de740 100644
>>> --- a/vshard/router/init.lua
>>> +++ b/vshard/router/init.lua
>>> @@ -470,6 +470,114 @@ end
>>>    -- API
>>>    --------------------------------------------------------------------------------
>>>    
>> I thing following changes could be moved into sepearate file.
> I thought of that, but decided it won't improve much. These futures are
> a part of router_call, they can't be used for anything else. Because
> are specific to how the storage answers to router_call.
>
> They won't work for replicaset:call() nor for router_map_callrw()
>
> So by moving them out I won't make it easier to reuse them or make
> them more independent. I will just reduce init.lua file size, which
> is not a primary goal.
>
> I was rather hoping to move the entire router_call() into its own file
> eventually with all its satellite structures and functions used only
> by it.
>
> Does it make sense?

I thought about simplification, not about reusing. As for me it's simpler to

keep some logic into separate file. But I won't insist.


  reply	other threads:[~2021-10-01  6:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 23:08 [Tarantool-patches] [PATCH vshard 0/2] VShard new netbox Vladislav Shpilevoy via Tarantool-patches
2021-09-28 23:08 ` [Tarantool-patches] [PATCH vshard 1/2] router: wrap is_async futures completely Vladislav Shpilevoy via Tarantool-patches
2021-09-29  6:18   ` Oleg Babin via Tarantool-patches
2021-09-30 22:39     ` Vladislav Shpilevoy via Tarantool-patches
2021-10-01  6:38       ` Oleg Babin via Tarantool-patches [this message]
2021-09-28 23:08 ` [Tarantool-patches] [PATCH vshard 2/2] test: drop error codes from test output Vladislav Shpilevoy via Tarantool-patches
2021-09-29  6:18   ` Oleg Babin via Tarantool-patches
2021-10-01 21:14 ` [Tarantool-patches] [PATCH vshard 0/2] VShard new netbox Vladislav Shpilevoy via Tarantool-patches

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=bf551af8-4fb7-aefb-7906-f6d2fefe25ce@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=olegrok@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH vshard 1/2] router: wrap is_async futures completely' \
    /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