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 799906EC55; Wed, 16 Jun 2021 00:00:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 799906EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1623790828; bh=xArUU+Kx265g4ttVD+OAoqtmEr9z/ZNI8UTQWLN1Oj0=; 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=DHTVy4qEmQN/h3K8uc7JBe3w3xhmFby9fG0uqeI69tHMLpwkMn8qbUSYyeEtykUTK jULgcVqu1ptbJlPADbJ6a5ETbOKyqBcSbEyxlr7Vl+5pb2tsTVuZMFAaXQXY0a9+5C 49jwJW93Ncy1cAeBmX/eTpoJAUq/Qd8sN1nI3bTc= Received: from smtp43.i.mail.ru (smtp43.i.mail.ru [94.100.177.103]) (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 03AF86EC55 for ; Wed, 16 Jun 2021 00:00:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 03AF86EC55 Received: by smtp43.i.mail.ru with esmtpa (envelope-from ) id 1ltGAc-0007Mf-9w; Wed, 16 Jun 2021 00:00:26 +0300 To: Serge Petrenko , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: <93a4765cb6918512946bf9366fe4ad478345bce1.1623331925.git.sergepetrenko@tarantool.org> Message-ID: <76d19171-2257-35e3-8f07-b1f0323c728f@tarantool.org> Date: Tue, 15 Jun 2021 23:00:25 +0200 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: <93a4765cb6918512946bf9366fe4ad478345bce1.1623331925.git.sergepetrenko@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9D5B0DA836B685C543EF5F9E25E4001B3518B676B8BE4A4C7182A05F538085040C91D02AA3720FD0EB6DAB3379812297F5845C1EE9693EA8E27F70D020E8E350E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F294D2C421F5B30DEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B12C6B1582157D838638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D880A5191C75F260E63C7060420859691E117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18F04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE7B96B19DC4093321B1CA5D0BF4193578D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3A816C540FC8EEC3003F1AB874ED89028C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637BBEA499411984DA1EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2368A440D3B0F6089093C9A16E5BC824A2A04A2ABAA09D25379311020FFC8D4AD5F94BE2FBACB1A8E503C297F41507BBA X-C1DE0DAB: 0D63561A33F958A57DF3A8E0F57639AE9E4E35C3EC7BB2E0493A861CD4AEF736D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34728AF701C68E4539E37BAB49E1654F947A4FA43E5050DEEED8318F26DEECB879BD3EE928826B61071D7E09C32AA3244C14E253A5E74D4172FC49964857F22AF6E8FBBEFAE1C4874CFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj6OL1iHTyIM2pW3kTeIqJ4A== X-Mailru-Sender: 504CC1E875BF3E7D9BC0E5172ADA31100BC472784149C7076637841C7D4397B68CBBC809E33142E207784C02288277CA03E0582D3806FB6A5317862B1921BA260ED6CFD6382C13A6112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 5/7] replication: send latest effective promote in initial join 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" Thanks for working on this! Hm. The patch makes me think why don't we send the Raft checkpoint on join too? Otherwise it might happen that a replica joined, didn't get the most actual Raft term yet, then the leader died, and the replica would start elections with term 1. Even if the latest term was 1000. Nothing critical, Raft will probably work, but it could be an "optimization"? Also it would be consistent with the libmo state - send all the snapshot data on join. Btw, the limbo state contains a term. And it means that after join, but before subscribe, the limbo's term is bigger than raft's term. Even though in the comments of the limbo we say: * It means the limbo's term might be smaller than the raft term, while * there are ongoing elections, or the leader is already known and this * instance hasn't read its PROMOTE request yet. During other times the * limbo and raft are in sync and the terms are the same. which means the limbo term should be always <= raft term. Can this break something? Is it possible to make a test confirming that we can't send the limbo state before the raft state?