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 13E446E454; Thu, 10 Feb 2022 17:25:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 13E446E454 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1644503146; bh=Boqnsielrm277UxEofWx+zfZuiZvCq8py5JHrfRWLoY=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Jqfht7wcJp6gBI3P1YQDGQga+CnFC+FEteO3SR8PZAnc0fWYskRR2pkLPM/JoGebW kvjz8Ki7qm4OLqxDLmmvVJ/EofSxOOeDhjjLjTHYwJ0WuHiVufcaZ8U1SZyFBzoqQ/ aqCjn0jBHVdVQy7HJvxSbfX3yTQGxZlmVEBSpJm0= Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (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 7CD9D6E454 for ; Thu, 10 Feb 2022 17:25:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7CD9D6E454 Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1nIAOF-0006PP-OF; Thu, 10 Feb 2022 17:25:44 +0300 Message-ID: <268e53a6-496d-9c90-c9ae-1d0a65d05c3f@tarantool.org> Date: Thu, 10 Feb 2022 17:25:43 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org References: <3a1c7b7824df4481c8d70d4867d8af430b6c5b83.1644455329.git.v.shpilevoy@tarantool.org> In-Reply-To: <3a1c7b7824df4481c8d70d4867d8af430b6c5b83.1644455329.git.v.shpilevoy@tarantool.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9B74B50284A7C1A0B1BCE06C34C5A694E3AC40405103F0D82182A05F538085040922A2EED6B003F224B803D5BAA73A996D2305A92B3EAC1C12558E0BD33C70452 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE706BB9CA6FE35398DEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375189E43B47FB350A8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D89D606EE4AA64D5F04DA92B7405D5DA24117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCEA77C8EAE1CE44B0A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B08F9A42B2210255C75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 0D63561A33F958A51345456CCE1405DA4C37E038A0FAB035D8FFE2364902678CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7506FE1F977233B9BB410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D344A2E3AE0A8792E69AA5AE2CF1CC212539AA95FFF3A4F93ADEC1FA8848C77EBE4CAD698D5C956ADD91D7E09C32AA3244CFA3B8D15CCA44C0E5372A3E49DAA53AE35DA7DC5AF9B58C0729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojtO9NuZTWcnPZoH/JYkIpAw== X-Mailru-Sender: 3B9A0136629DC9125D61937A2360A44689F41DAA652FCB2530505A43E18BB83D3EDE748897F45397424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BCB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 1/1] raft: do not rely on just ev_is_active for timers 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" 10.02.2022 04:09, Vladislav Shpilevoy пишет: > When timer has 0 timeout and 0 repeat, during timers preparation > libev makes them inactive right away but puts into the array of > pending events. > > Therefore to check if a timer is really active (will be executed > in the future) need to look both at ev_is_active() and > ev_is_pending(). > > It could happen only during split-vote, because all the other > places use election_timeout + random shift, while split vote uses > just random shift - it can be 0. > > The patch makes raft do that for all timer checks. Also to make > the testing reliable and not depend on random the shift factor now > is configurable. For the test it is set to 0. > > Closes #6847 > > NO_DOC=Bugfix > NO_CHANGELOG=Bug was not released > --- > Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-6847-split-vote-crash > Issue: https://github.com/tarantool/tarantool/issues/6847 > Thanks for the quick fix! LGTM.