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 3EBA46EC40; Thu, 12 Aug 2021 13:49:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3EBA46EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628765343; bh=BEt/4rHxIlXKqs5e3z949ui+9lUrgTK0xDLHODqJ3tM=; 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=dGJpIPfTeRIjTiFoUDmrrrhI+wGN3XDGcNACzxvo78i7SCPpkg/uFwekn5nwR713W SmwLt6gFoEK/V4cKOp1sKTmtifYkyEslCSYjrLGg0thNq+RckwWhwOjWD2XSknm5TT 6MAf+dJpENVzCcei1l4U0HnHSuahV0TQtrLvanAA= 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 21AE56EC40 for ; Thu, 12 Aug 2021 13:49:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 21AE56EC40 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1mE8Gj-00073c-6q; Thu, 12 Aug 2021 13:49:01 +0300 Date: Thu, 12 Aug 2021 13:48:59 +0300 To: mechanik20051988 Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org, mechanik20051988 Message-ID: <20210812104859.smvrftjrdqezgpcv@esperanza> References: <4cfe4cc12fdc83d1620c9df180e2054501c123fa.1628759886.git.mechanik20051988@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4cfe4cc12fdc83d1620c9df180e2054501c123fa.1628759886.git.mechanik20051988@tarantool.org> X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD9ECFD080E047A606F6525B29142351271182A05F538085040AE98B0F19EFEA20FEBED4CB3C33320BB0054C48E8C4CEBA79F2531095DBA3DB7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70A10A23A3B64B805EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F907CB39E8CA2E228638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8F96816DB676FDE15AB8AD10513FDA756117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC55B19328CBC4F849A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520B1593CA6EC85F86DC26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B613439FA09F3DCB32089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5102D0512E45A7BDB4B70922163BF2881C59DECC21CAE366CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA753177526CD55AFC11410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3473688ED311681BF03B91AA018FB5C5BC1652C9FE579C5507CA1D228EF878BC268F921E59E244C22A1D7E09C32AA3244CBF7BDD7BDDF007C9F48F9B93DA1341DB435BF7150578642F83B48618A63566E0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojKW4rnL99YhKBf3y3xflrWQ== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D87F7A28BAF692179220524D38C008559274CEFED1673C562683ABF942079399BFB559BB5D741EB966A65DFF43FF7BE03240331F90058701C67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 8/9] iproto: implement interactive transactions over iproto streams 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, Aug 12, 2021 at 12:50:45PM +0300, mechanik20051988 wrote: > diff --git a/src/box/call.c b/src/box/call.c > index a6384efe2..0ce84b1ed 100644 > --- a/src/box/call.c > +++ b/src/box/call.c > @@ -715,7 +740,17 @@ iproto_msg_new(struct iproto_connection *con) > static inline bool > iproto_connection_is_idle(struct iproto_connection *con) > { > + /* > + * The check for 'mh_size (streams) == 0' was added, because it is Please fix formatting (you use spaces instead of tabs here). > + * possible that when disconnect occurs, there is active transaction > + * in stream after processing all messages. In this case we send > + * special message to rollback it, and without this check we would > + * immidiatly send special message to destroy connection. This would immediately > + * not lead to error now, since the messages are processed strictly > + * sequentially, and rollback does not yield, but it is not safely and and? > + */ > return con->long_poll_count == 0 && > + mh_size(con->streams) == 0 && > ibuf_used(&con->ibuf[0]) == 0 && > ibuf_used(&con->ibuf[1]) == 0; > }