From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id A153D6FC87; Fri, 1 Oct 2021 09:39:01 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A153D6FC87 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1633070341; bh=ij2lXcKeJpj10i0uyER1YVLT4BXkioiytp94VDhw7ww=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=C4E42/rfGbM9mWn4tq7tNVMZ95lV0emGdgsVS/Y87ggkyfB6mAnx1prw7mCUuWHH5 gplDQm0n2HPOqZmVJ4axCn1fCJkYBnihXA5KSabU+oUND3kwcM1ofLEcLiU0h1TgqM XdO+Pl7FgelyIO7nkJDdQZonpnqJcvvm42LWowQU= Received: from smtp57.i.mail.ru (smtp57.i.mail.ru [217.69.128.37]) (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 7141C6FC87 for ; Fri, 1 Oct 2021 09:38:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7141C6FC87 Received: by smtp57.i.mail.ru with esmtpa (envelope-from ) id 1mWCCA-0001RP-Pa; Fri, 01 Oct 2021 09:38:59 +0300 To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org References: <6f2babce-b5eb-ecd3-394b-29486e56dbdb@tarantool.org> <2787659c-f3fc-7552-6762-9fa78f883764@tarantool.org> Message-ID: Date: Fri, 1 Oct 2021 09:38:58 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <2787659c-f3fc-7552-6762-9fa78f883764@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD96A58C36AA2E996499DED20B83AFF2DE94FA0C0F669C426FD182A05F538085040D895258684CA14990324BB098D61FD37670567D561AB704A57D78BEC35F7BF4C X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE77603ADE015AF816DEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063770995E888C5C26978638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D889F89ACF294DED737B89B93A9D180BA7117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCECADA55FE5B58BB7A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352026055571C92BF10FCB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE9647ADFADE5905B16B91AC3BD56FC247D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3FA486DC37A503D0BBA3038C0950A5D36B5C8C57E37DE458B0BC6067A898B09E46D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7BEE702378D8A34C7731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A53B49CE5B02C543EC368D7D44BBB59B0658D9131F9745240ED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA757AF5085B7B0228D6410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3435B1F14A93C4073FEE2377B3636C6F49C264CFE4C781453665A9EABC20D0B5E21A5D7B3EBE90DD6F1D7E09C32AA3244C59CBDAA43CF4003CA8BA8143DF101FB8E3D93501275E802F729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojJNmX3owDPmFcxZT1sRLb4A== X-Mailru-Sender: 583F1D7ACE8F49BD1042885CEC987B6B05F802F7C8FFD1870324BB098D61FD377345D355D45E21A67019711D9D5B048E1458020726E2BC9FD5ECBA0B92C0A936CDC7563AA7CEBD287402F9BA4338D657ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH vshard 1/2] router: wrap is_async futures completely X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Oleg Babin via Tarantool-patches Reply-To: Oleg Babin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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.