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 6CBDE6EC55; Thu, 29 Jul 2021 13:55:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6CBDE6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627556103; bh=n4FIwLgIl7AqLo5xyJ6HA2LADQaOKvNf4GxnvBmT5c4=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=QZ5kcT3ryd/3wFGFEnt/LAyAyFQHXQDhn0fWE15NnCFifYf7NdEYFc1aSUo+a5CfO 7JF6Yg1Ox5aC4TTRd5TNu/yQHPhAsV7GpmlbUSz6eGF7L70fZszeriTmzU9So16VaV 3QCdyQq+mL6DhmS4bZtvlAxQB6+uACIRzPWXowYo= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 260126EC55 for ; Thu, 29 Jul 2021 13:55:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 260126EC55 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1m93gr-0000ON-FD; Thu, 29 Jul 2021 13:55:01 +0300 Date: Thu, 29 Jul 2021 13:54:59 +0300 To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org Message-ID: <20210729105459.g3ixkeh4gqpvt2ig@esperanza> References: <83ad38fd1425a056ea71daab77e1dde18087aed0.1627024646.git.vdavydov@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C33D83595CA30D6DC5179D1C9A908C47E5182A05F538085040566BB8C45EFE3D4EF7046159ABDE8ADF1A41F4374C7524E8EE2046D9452B932F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73F300A97FDD4E158EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637A85D247F7B1E5F958638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8761A83D415BC6390D8E76E561035C6AA117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC55D5BE2F85BDEC5FA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751F2CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6D0C9BB9AE6BD5D69089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A55BDA1F3A54ABADAB97E4B442D420A03B713A8C9204E0BC5AD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA753530422897FB34C3410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34C1D376EF32BB0896E0072DB670DC956ADA37D2231E5856FF8456B3E2A1B495E17E15067C39B8BBA11D7E09C32AA3244C6E1B8FADB3BED86D4C01E59B2E9E0A32725D5B54B2FE4575FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojPp/mPgZxawF8QE/4rleB+Q== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D89C00198598ECD642F08E1852E4FF96C274CEFED1673C562683ABF942079399BFB559BB5D741EB966A65DFF43FF7BE03240331F90058701C67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 06/20] net.box: rename request.ctx to request.format 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: Vladimir Davydov via Tarantool-patches Reply-To: Vladimir Davydov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Thu, Jul 29, 2021 at 12:49:39AM +0200, Vladislav Shpilevoy wrote: > On 23.07.2021 13:07, Vladimir Davydov via Tarantool-patches wrote: > > Request context only stores tuple format or nil, which is used for > > decoding a response. Rename it appropriately. > > The name ctx was chosen intentionally, because when you pass it to > method_decoder[request.method](...), you don't know how will it be > used and what is stores. It was internal for the request sender and > codec. Why do you need to change it? For one thing, it's always either nil or format. Naming it ctx is confusing. The reason I'm doing this in the scope of this series is that it is stored in the request class. Lua isn't a strictly typed language so we can store whatever we want there, but in C we need to know the type to define the request struct, see netbox_request::format here: https://github.com/tarantool/tarantool/blob/73cab8402f7e098c8e908af9a2b72695c754c472/src/box/lua/net_box.c#L99 Turning ctx to format solves this problem.