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 6A6846EC55; Fri, 9 Jul 2021 11:30:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6A6846EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1625819422; bh=lUmKy6wELJV8EVQKwOxVlzcleHy8nna+fhNy6gJ7DJg=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=FOA9cXPNNnBCLimaHoHhcOxzjTUqfJ0HMnzMcfaqjIIk0CLvkBgLY5zeIvJ6rz04e 52uKaZBcf2Ao8DQtZ3p5akXiqKwAnCIEo6wh8H9v33CkYnuxLkkyChp7lGKzgL8ZZs uMZ10eakBkBF4NYTEPLw59X3gpAAh1/6EPILtulc= Received: from smtp38.i.mail.ru (smtp38.i.mail.ru [94.100.177.98]) (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 8AA466EC55 for ; Fri, 9 Jul 2021 11:30:21 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8AA466EC55 Received: by smtp38.i.mail.ru with esmtpa (envelope-from ) id 1m1lts-0008LP-RS; Fri, 09 Jul 2021 11:30:21 +0300 To: Cyrill Gorcunov Cc: v.shpilevoy@tarantool.org, tarantool-patches@dev.tarantool.org References: <20210709074048.18169-1-sergepetrenko@tarantool.org> Message-ID: <7d4e959e-baab-85ff-488d-d1dbfd5e80a5@tarantool.org> Date: Fri, 9 Jul 2021 11:30:20 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD954DFF1DC42D673FB0BF54D2F3864CF3988C47C6E5746740D182A05F5380850405F30B94C0FE86D447876E6FC8453064EE7C841DEFB257CF10A5980AF777C7A7B X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE77603ADE015AF816DEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637A521848D7B067A388638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D82950D3B71C25D48E776E25F912FE283B117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3A703B70628EAD7BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352026055571C92BF10F28451B159A507268D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EED76C6ED7039589DE03CEA74F0D118906D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3CE135D2742255B35AD7EC71F1DB88427C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F790063757B1FBEA53BC6EDBEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A520AFDF956F7B0519E24B3043AF2017ECE6775C2E901007A1D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA753753CEE10E4ED4A7410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D16EA493CC1FD9F80A4A3DC362B689A9E7D0F9ECEF9598BA2BE1C4666FB42135AB8B188A1FA9C5A21D7E09C32AA3244CA0BBE3A4FBA507970ECCD5AD962127F8FE8DA44ABE2443F7FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojR+u4utVEKRzEfzRMiWc3Vw== X-Mailru-Sender: 583F1D7ACE8F49BDCE9F948DA3B7A953AB7F4B4E42FAB4E766FE93DD4AAA208FE4CA9D3CE8B3788C6BB2E709EA627F343C7DDD459B58856F0E45BC603594F5A135B915D4279FF0579437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] replication: stop pushing TimedOut error to the replica 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: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 09.07.2021 10:59, Cyrill Gorcunov пишет: > On Fri, Jul 09, 2021 at 10:40:48AM +0300, Serge Petrenko wrote: >> @@ -549,6 +550,12 @@ iproto_write_error(int fd, const struct error *e, uint32_t schema_version, >> >> size_t region_svp = region_used(region); >> mpstream_iproto_encode_error(&stream, e); >> + struct errinj *inj = errinj(ERRINJ_IPROTO_WRITE_ERROR_LARGE, >> + ERRINJ_INT); >> + if (inj != NULL && inj->iparam > 0) { >> + char garbage[inj->iparam]; > Serge, I didn't read the patch yet but this moment is very dubious. > While standart allows to allocate dynamic stack here it may lead > to unpredicted effects. I would suggest to use malloc if this > won't cause significant rework, hm? Surely this can be done on > top of the patch (actually you did a huge amount of great work > investigating this issue, thanks!!!) Thanks! No problem, will rework. It might be better to not allocate any string at all. I can simply allocate the needed buffer on the region (where the msgpack will be encoded), and encode the string header, and leave the buffer with whatever contents it has (it'll probably be filled with 0x50 bytes, it's the slab poison symbol). -- Serge Petrenko