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 DA5AD6EC42; Sat, 5 Jun 2021 02:38:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DA5AD6EC42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1622849883; bh=8wZI7nSybkyMg1y0Y8pMWyiGCFMFWBvIs5OsCsAQnUo=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=jscCB/ghpCbQyq4gB6eQFUm/HqR7/v0lDoL8oLwVLrBs7vK84iTQTwpuOnCfH4thO 1/PU9Cdk55xeouG0cl8JoYGdflXOzXuhpXQXx3adcdPrejH2Do9INwvFnACuE8hdGY mmM7G1NjedQt4/ua1iVbZlPHZXpCIIitcJFWavjw= Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (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 243646EC40 for ; Sat, 5 Jun 2021 02:38:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 243646EC40 Received: by smtp16.mail.ru with esmtpa (envelope-from ) id 1lpJO5-0001Ge-7x; Sat, 05 Jun 2021 02:38:01 +0300 To: tarantool-patches@dev.tarantool.org, gorcunov@gmail.com, sergepetrenko@tarantool.org Date: Sat, 5 Jun 2021 01:37:54 +0200 Message-Id: X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9D5B0DA836B685C5423CDB5763716BB867A249A0077715520182A05F538085040C05F5C1BA2AF2E52A6B37447913E7CBAD686CBD87BF0D903CEA7E786B3071ADB X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7646B74825E00C605EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378D70459434292EC88638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D851620FA27179FFA2B2E0E9C442E4EB9B117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18618001F51B5FD3F9D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEC24E1E72F37C03A028F6BDBBAB179F4ED8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3E753FA5741D1AD02C0837EA9F3D19764C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006373BC478629CBEC79DEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2368A440D3B0F6089093C9A16E5BC824A2A04A2ABAA09D25379311020FFC8D4AD775094620C760E120CDDCEC3E9B814C8 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C4C7A0BC55FA0FE5FCB6FCF7DF0632C14273FF8E1319B223B43B83A41E80D98F0EB1881A6453793CE9C32612AADDFBE0617B34A58113D5E3C69510FB958DCE06DB6ED91DBE5ABE359ADBCB5631A0A9D21F23D4379F09C64C7393EDB24507CE13387DFF0A840B692CF8 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34C2BE7381A0AD3DF15FB389153EFF71A662FA4EB0C860E008646AA1F8C655F461DE1B7CBCC5C48DEA1D7E09C32AA3244CE7996D48CFE5D6D34E8C6D4EAE3AF08AF26BFA4C8A6946B8FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojz99asgmzejr4J1xtH2bpZA== X-Mailru-Sender: 504CC1E875BF3E7D9BC0E5172ADA3110B8F3BE3BFF3B96502EC21EBAB6A9AA68B35B37D116FEEF1D07784C02288277CA03E0582D3806FB6A5317862B1921BA260ED6CFD6382C13A6112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: [Tarantool-patches] [PATCH 0/6] Instance join should prefer booted instances 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" See the commit messages for the details. I did some basic tests for backward compatibility since I added a new field to the ballot, and it works fine. Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5613-boot-scores Issue: https://github.com/tarantool/tarantool/issues/5613 Vladislav Shpilevoy (6): replication: refactor replicaset_leader() replication: ballot.is_ro -> is_ro_cfg replication: ballot.is_loading -> is_ro replication: introduce ballot.is_booted replication: use 'score' to find a join-master replication: prefer to join from booted replicas .../gh-5613-bootstrap-prefer-booted.md | 6 ++ src/box/box.cc | 17 ++-- src/box/iproto_constants.h | 5 +- src/box/replication.cc | 82 ++++++++----------- src/box/replication.h | 5 +- src/box/xrow.c | 30 ++++--- src/box/xrow.h | 13 +-- .../gh-5613-bootstrap-prefer-booted.result | 70 ++++++++++++++++ .../gh-5613-bootstrap-prefer-booted.test.lua | 21 +++++ test/replication/gh-5613-master.lua | 11 +++ test/replication/gh-5613-replica1.lua | 13 +++ test/replication/gh-5613-replica2.lua | 11 +++ test/replication/suite.cfg | 1 + 13 files changed, 207 insertions(+), 78 deletions(-) create mode 100644 changelogs/unreleased/gh-5613-bootstrap-prefer-booted.md create mode 100644 test/replication/gh-5613-bootstrap-prefer-booted.result create mode 100644 test/replication/gh-5613-bootstrap-prefer-booted.test.lua create mode 100644 test/replication/gh-5613-master.lua create mode 100644 test/replication/gh-5613-replica1.lua create mode 100644 test/replication/gh-5613-replica2.lua -- 2.24.3 (Apple Git-128)