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 D538B6EC55; Tue, 27 Jul 2021 01:37:21 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D538B6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627339041; bh=HEXwDEoJLZtnVvLDGYQDEtYg9KpEtmTa7hBxZb21EG4=; 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=RHdSCjqgIVEdHqIrvSuDU4VdPRelgtTNJFc7diK2PmeCo8naw5In9oYaY8rGUtojN RQLvYuru/SVgrbPQ6GLLCjb8Yay9n6DH/s0tnb7cENnpOxvvRNVLrhoZTv515ZXh3s IF8bPkgQDYaI2RhVwuwefAghwVRuVVj51uOkRfSc= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 0744E6EC55 for ; Tue, 27 Jul 2021 01:37:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0744E6EC55 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1m89Dq-0004K9-Sy; Tue, 27 Jul 2021 01:37:19 +0300 To: Vladimir Davydov , tarantool-patches@dev.tarantool.org References: Message-ID: Date: Tue, 27 Jul 2021 00:37:17 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD941C43E597735A9C354866C15C72ED952BE56FFA0EFAF5B8C182A05F538085040E7E245F767779A9A6502BE5BE5C8019C44323469B9E6B30CF4C701ED00DA3521 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7B9FBA884A7C9B8BAEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006373E84C2AB7EADEB148638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D89FE66DA35434EE8B617BBDDA1579AB9A117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3A703B70628EAD7BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751F6FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B613439FA09F3DCB32089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505BDD0D79F022A9EC9AD349FA82B1FA390 X-C1DE0DAB: 0D63561A33F958A5830BCDD3071B0BB765B3DCAF8AECB16568588815BCE894E3D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75FA7FF33AA1A4D21C410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3447DF5779098ECEE9AE78C054C49ED1A0228427CB3E32AB046F9A4DF42A098F8DF445F5CD5D499D2E1D7E09C32AA3244C49783066C6FFCE74BC4F2940072D12FBD08D48398F32B4A6729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojMEANdStWW5+AQ/5UWY2jAA== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DF63A8C4A0ABFA9BE25BBEA8D119F296C3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] net.box: drop conn:timeout() 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thanks for the patch! I hope I was supposed to review this. Could you please add the reviewers into CC/To for next patches? See 5 comments below. On 26.07.2021 12:58, Vladimir Davydov via Tarantool-patches wrote: > conn:timeout(timeout) writes (now + timeout) to conn._deadlines table > keyed by fiber.self(). The deadline will then be used by all conn > methods unless specified explicitly in the options argument. > > Usage of fiber.self() degrades net.box performance by about 15% in case > timeout is not specified, because it is a C call and so interferes with > JIT. See the ticket for the test details. > > Since the feature is unusable and was deprecated more than four years > ago (in 1.7.4) in favor of specifying timeout in the options argument > (see commit 58da206c33197), it should be fine to drop it. 1. Is it possible to add the commit title after the hash in quotes and parentheses? Like this: (see commit 58da206c33197 ("net.box: add { timeout = } option to requests")) It helps to quickly understand what was the commit about without copy-pasting the hash for `git show`. https://github.com/tarantool/tarantool/wiki/Code-review-procedure#commit-message > Closes #6242 > --- 2. May I ask you please to push the patch onto a branch and attach the issue and branch links after `---` in the first/cover email? For next patches and for this one too. It simplifies the review; makes your patch pass CI before the review (or not pass); and simplifies patch push in the end. https://github.com/tarantool/tarantool/wiki/Code-review-procedure#sending-the-patch 3. The "feature" is still documented: https://www.tarantool.io/en/doc/latest/reference/reference_lua/net_box/#conn-timeout You need to add a docbot request to the commit message for the documentation team to remove all the mentionings of the old API. For the syntax you can look at https://github.com/tarantool/docbot#docbot---tarantool-documentation-pipeline-bot. For examples: grep by `TarantoolBot` in git log. > diff --git a/changelogs/unreleased/gh-6242-net-box-drop-conn-timeout.md b/changelogs/unreleased/gh-6242-net-box-drop-conn-timeout.md > new file mode 100644 > index 000000000000..69d12fb858e5 > --- /dev/null > +++ b/changelogs/unreleased/gh-6242-net-box-drop-conn-timeout.md > @@ -0,0 +1,9 @@ > +## feature/core > + > +* **[Breaking change]** timeout() method of net.box connection, which was > + marked deprecated more than four years ago (in 1.7.4) was dropped, because > + it negatively affected performance of hot net.box methods, like call() and > + select(), in case those are called without specifying a timeout. 4. Wouldn't it be hard, please, to reference the issue in the end of the text using `(gh-####)` format? See other changelogs for examples. > + > +--- > +Breaking change: timeout() method of net.box connection was dropped. > diff --git a/src/box/lua/net_box.lua b/src/box/lua/net_box.lua > index 3878abf21914..15e6c093cc15 100644 > --- a/src/box/lua/net_box.lua > +++ b/src/box/lua/net_box.lua > @@ -1289,28 +1280,11 @@ end > > function remote_methods:wait_state(state, timeout) > check_remote_arg(self, 'wait_state') > - if timeout == nil then > - local deadline = self._deadlines[fiber_self()] > - timeout = deadline and max(0, deadline - fiber_clock()) > - end > return self._transport.wait_state(state, timeout) > end > > local compat_warning_said = false > > --- @deprecated since 1.7.4 > -function remote_methods:timeout(timeout) > - check_remote_arg(self, 'timeout') > - if not compat_warning_said then 5. compat_warning_said can be deleted now. In the future you can find such remnants using luacheck, which was integrated into our CI and can be run locally. For that you need to install Tarantool into any folder, install luacheck rock, and then you can do something like this: $ ./.rocks/bin/luacheck --codes --config .luacheckrc src/box/lua/net_box.lua Checking src/box/lua/net_box.lua 1 warning src/box/lua/net_box.lua:1286:7: (W211) unused variable compat_warning_said