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 6DEE76EC55; Fri, 11 Jun 2021 11:43:15 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6DEE76EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1623400995; bh=AAwPLeI3qZrCFzQPmi1NWVBpmI55QyxVo/0UJI66E/o=; 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=UYlZpuj26UikbqarmP82bviN4sef09+Naiis4fZMZDCv/zPd+hv3hDu+et6ws6Dfh XiRz7fEsvR97PnHOKESDpXk4ZovZj7Qi+lnWhxwzvHs1f8PUPaw1KOCghxsLLXjoaV ouLpqfrIZLEhaV8iCT5VIN+Q8/Q6NqyZ5jdNWBfA= Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [94.100.177.96]) (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 CE34E6EC55 for ; Fri, 11 Jun 2021 11:43:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CE34E6EC55 Received: by smtp36.i.mail.ru with esmtpa (envelope-from ) id 1lrckz-0000eQ-5r; Fri, 11 Jun 2021 11:43:13 +0300 To: Cyrill Gorcunov Cc: v.shpilevoy@tarantool.org, tarantool-patches@dev.tarantool.org References: Message-ID: Date: Fri, 11 Jun 2021 11:43:12 +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: 4F1203BC0FB41BD9D5B0DA836B685C544BBC2A69B1B4100B389BF69B7A224D7C182A05F53808504090F4652A1B83851960AE744362FB593447EA686C693B1B3EE5A0C0A7726688CE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7370F4F695FFFC24BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006374D0D183F14C070BA8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D83E0A4FE45D518F461EEF4906B57E4090117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751F2CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE652FD71AFB96DC7DFCE65BE3358055BDD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3AD0E433DBF1FBFA3BA3038C0950A5D36B5C8C57E37DE458B0BC6067A898B09E46D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE732FCE54C4D9A645443847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A54E7314C7AB0D51A8AE6E34354546C7CC8415B8C95DAB95F4D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3494FB0335DF05DC3A2FB5D13F85F11A45F1D43E85A0DAE51220D41402D83DBB6BFD16CB5FACE00F261D7E09C32AA3244CE01FADA9CD609C2E3380D2D08AFACC743A76366E8A9DE7CAFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojQR1NM653rVGkEJ/selx8cg== X-Mailru-Sender: 583F1D7ACE8F49BD9DF7A8DAE6E2B08A7D89CA257FD51F3E6C25C11809C360C6C5F6F3455156DD40424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 1/7] replication: always send raft state to subscribers 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.06.2021 19:47, Cyrill Gorcunov пишет: > On Thu, Jun 10, 2021 at 04:32:51PM +0300, Serge Petrenko wrote: >> - if (raft_is_enabled(box_raft())) { >> + if (replica_version_id >= version_id(2, 6, 0) && !anon) { >> /* >> * Send out the current raft state of the instance. Don't do >> - * that if Raft is disabled. It can be that a part of the >> - * cluster still contains old versions, which can't handle Raft >> - * messages. So when it is disabled, its network footprint >> - * should be 0. >> + * that if the remote instance is old. It can be that a part of >> + * the cluster still contains old versions, which can't handle >> + * Raft messages. Raft's network footprint should be 0 as seen >> + * by such instances. >> */ > Serge, why can't we send raft state for anon replicas as well? As far > as I understand anon replicas do receive raft updates from WAL notifications, > right? So this is somehow inconsistent that WAL's based raft updates are > reaching anon replicas while initial state from subscribe state is not, > or I miss something? No, anon replicas don't receive Raft notifications at all. See relay_send_is_raft_enabled() calls. Also raft state is persisted as a local row, and it's not replicated directly via WAL. All raft state updates are pushed to peers via relay_push_raft(). So, I wanted to stay consistent here, i.e. not send raft state to anonymous replicas. Besides, anonymous replicas can't enable elections at all, so there's no point in sending the updates to them. -- Serge Petrenko