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 782936ECE4; Thu, 20 Jan 2022 03:43:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 782936ECE4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1642639430; bh=1J+ns/uj98wzqQND+TwbRLXKESp3G8Zus2kuo+C3j78=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=KggQsWS3qIIfJcwzkZKQleWfE7fRH1LcQcj1n9uYHx5uHLR4H+l47BnY6VHYdavY9 L+WYJ4KSKeLSWNg3OFjBnOOnxECprowKur1pkQg85T9HtYiSLDa8bA35/TFPcVHvjJ bujIhUTGil9DlaCWsEhyyYrsR+UxkYQOV0msQNL8= 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 EC2776ECE3 for ; Thu, 20 Jan 2022 03:43:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EC2776ECE3 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1nALYK-0006wT-3W; Thu, 20 Jan 2022 03:43:48 +0300 To: tarantool-patches@dev.tarantool.org, sergepetrenko@tarantool.org Date: Thu, 20 Jan 2022 01:43:42 +0100 Message-Id: X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD98A33503A0B8627DBA78465C0ED1D0F3062AE718BAE98551D182A05F53808504091991DE314BBBDCEFA20F590B1F4B91C47B8C43CF74606D05FDA7612D1208ECC X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7FCFCB92DA8654BB0EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006374F960C921106F05B8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8474CB3DA61FFF7D4DB76D1FD8E1E3945117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6B1CFA6D474D4A6A4089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C0410BD8E874E3D5CA7F2D523EA0B7F5C956247F0F749914A9C2B6934AE262D3EE7EAB7254005DCED7FAC0517EE9C78281E0A4E2319210D9B64D260DF9561598F01A9E91200F654B03031C89702B531498E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34FD9114F69CA58D1EDA03DAC37C4B80A7E7179381619761BC079F3024A02B9CE5FBB6AF56BD23F3931D7E09C32AA3244C62944D0223F0A91660122265333BB379E646F07CC2D4F3D8729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojPeoZbWa28mxyhHxfUTczzQ== X-Mailru-Sender: 689FA8AB762F739339CABD9B3CA9A7D693FDC60DFC4F0E3DA3DD0C21D901663B3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E25FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 0/5] Split vote and bugs 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" Split vote handling in Raft, its usage in storage, and 2 bug fixes found while working on this. Changes in v2: - dropped ev_timer.at usage; - disabled split-vote detection for cluster < quorum; - disabled split-vote for vote count > cluster; - re-checked split vote after WAL write; - re-checked split vote on quorum change. Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5285-raft-split-vote Issue: https://github.com/tarantool/tarantool/issues/5285 Vladislav Shpilevoy (5): raft: fix crash on election_timeout reconfig raft: fix ev_timer.at incorrect usage raft: track all votes, even not own raft: introduce split vote detection election: activate raft split vote handling .../unreleased/election-timeout-cfg-crash.md | 5 + src/box/raft.c | 4 +- src/lib/fakesys/fakeev.c | 10 +- src/lib/raft/raft.c | 222 ++++++++-- src/lib/raft/raft.h | 32 +- .../election_split_vote_test.lua | 92 ++++ test/unit/raft.c | 393 +++++++++++++++++- test/unit/raft.result | 87 +++- test/unit/raft_test_utils.c | 12 + test/unit/raft_test_utils.h | 5 + 10 files changed, 803 insertions(+), 59 deletions(-) create mode 100644 changelogs/unreleased/election-timeout-cfg-crash.md create mode 100644 test/replication-luatest/election_split_vote_test.lua -- 2.24.3 (Apple Git-128)