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 CE6856EC56; Fri, 23 Jul 2021 14:09:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CE6856EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627038543; bh=K42XRfBkGFxn3sj7PI7ZilN8RRU6bj2jbcY4XDQu62Y=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=JzqHq8PBmDnp8l+Sk1WjFGnJOMA3j+kC6hgbd07rrFjj/YuCF5MCj0rb9JxKKQQ8z /4f3OZeR2s8dgLZRUAt9PZnxR45O/b4Ok2kXsKyXEcbaXPxlS2nm5TXc90qoMv+16B g5NnxdywPcNEQfK5Ltfj0IvRvPWGtqcyOYry1pm8= 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 A5E6C6EC57 for ; Fri, 23 Jul 2021 14:07:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A5E6C6EC57 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1m6t1g-0004dl-8t; Fri, 23 Jul 2021 14:07:32 +0300 To: tarantool-patches@dev.tarantool.org Date: Fri, 23 Jul 2021 14:07:13 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-174C08C4: 5188C02AEC42908C481ED7ADC579193296BBA28369E3F2D2713F3D5F7D406D31BCF678C7329BA986 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C30288BCF456A452EC92BAB6D044D5CCDE182A05F5380850403BD144BBA40FDB91BD43C5D4CF674D041BB6BE77D395F506FB5A0B6A008B5A42 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE75263010198C72082EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E724D704EAF55A818638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8F691352967155326B3176B352AC34D7F117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCC109CDBF71E2B98BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352026055571C92BF10FF04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6753C3A5E0A5AB5B7089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 8BD88D57C5CADBC8B2710865C3867510A0B4543D0F65078DA3B1A56EE2B804F6B226C914C996894645FD9D8A29397D6EFF55FE49A3C2BFCFC8C84E951CD0BE2F296C473AB1E14218EA052B563B0B06C67866D6147AF826D8F691352967155326B3176B352AC34D7FF972CCD2F8FE1EF1CFC4036BBF6A4EA94C6FA2B30522215ACB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D345CB6DE26F165466739BBE0592775CD47E712F3F023F442C7CBC326B182A14A8DAEF7DA20B1C93A461D7E09C32AA3244CBC881B44FDFFE9CDCC4AB0F50A094167BBA718C7E6A9E042729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXiEX0g4jkpDtS4KJeaOGTUi X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D2CAB2036E16D1FA5BD4D03518F9CC4BE274CEFED1673C562683ABF942079399BFB559BB5D741EB966A65DFF43FF7BE03240331F90058701C67EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH 03/20] net.box: do not check worker_fiber in request:result, is_ready 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" request.id and request.errno are set appropriately whenever a connection is closed so there's no need to check if worker_fiber is running. We do not want to have this check in request methods so that we can move its implementation to C, where worker_fiber isn't (and won't be) available. --- src/box/lua/net_box.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/box/lua/net_box.lua b/src/box/lua/net_box.lua index cacb7473deb0..fc8468ed8a01 100644 --- a/src/box/lua/net_box.lua +++ b/src/box/lua/net_box.lua @@ -295,7 +295,7 @@ local function create_transport(host, port, user, password, callback, -- dispatcher. -- function request_index:is_ready() - return self.id == nil or worker_fiber == nil + return self.id == nil end -- -- When a request is finished, a result can be got from a @@ -315,8 +315,6 @@ local function create_transport(host, port, user, password, callback, return nil, self.response elseif not self.id then return self.response - elseif not worker_fiber then - return nil, box.error.new(E_NO_CONNECTION) else return nil, box.error.new(box.error.PROC_LUA, 'Response is not ready') -- 2.25.1