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 5A6266EC55; Tue, 27 Jul 2021 02:44:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5A6266EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627343068; bh=8t1wcXOYpFCbgtDQcJvpMb7PiEUZBDjF2iRpfjkcyC4=; 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=TpmB0nX4GZ0WK1huwbF3tHYKWc/Fe2sTJb2kInbWxH4ZTRxVxx9j5oZVMj31xWV9d tW8kER7CaPA/swm0UPjDPPr9HY8mKRsvFsmig1wHZNekItoKjEQzyPwA3XFh3QzNRw w9HJqW+3Sj64E4Xk0LcgVMweAglqbV1uhZ9eAZ0Y= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 27FB56EC56 for ; Tue, 27 Jul 2021 02:43:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 27FB56EC56 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1m8AGK-00040q-BQ; Tue, 27 Jul 2021 02:43:56 +0300 To: Sergey Petrenko , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: Message-ID: <6792924a-e20c-4040-6d5a-8f724ae20981@tarantool.org> Date: Tue, 27 Jul 2021 01:43:55 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C3038391AAE5FBFA7682283CBB09BF492D182A05F5380850406F03EBF693CEFD18F28775D5CFB375D11C41D4E152163C0E1096F31305396C68 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7195F30236A8D43B4EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006371E4BC0E00C009995EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BBCA57AF85F7723F26129B3F75E4632CC73107191D77E94D1CC7F00164DA146DAFE8445B8C89999728AA50765F79006370D9A29B7FD16D1239FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3AB4674FCF129DEEBCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7E1BCFB2C0BE3F189731C566533BA786AA5CC5B56E945C8DA X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505B043F014BEAB09597EAA6005C0011527 X-C1DE0DAB: 0D63561A33F958A50DF0C604F3BCE82CA9410F5B580EE8CA4FF74CA5AB64ECB8D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA753530422897FB34C3410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D340A58BF0C7EAC340F6AE099A96B5B8A2CCAC6F78F618ADB6FE3E3B3202E45A0F0299E37C36AD9478F1D7E09C32AA3244CC4141A698D3CFA40844E78F56DC7EEC93FD9C8CA1B0515E0FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojMEANdStWW5+YPqdhdGddlA== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DD0451C79C5F3096764F53CF80DE0EEF33841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 07/16] replication: send current Raft term in join response 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" On 23.07.2021 09:44, Sergey Petrenko wrote: > > 22.07.2021 01:24, Vladislav Shpilevoy пишет: >> Thanks for the patch! >> >>> diff --git a/src/box/relay.cc b/src/box/relay.cc >>> index 4b102a777..70f1a045b 100644 >>> --- a/src/box/relay.cc >>> +++ b/src/box/relay.cc >>> @@ -451,6 +453,10 @@ relay_initial_join(int fd, uint64_t sync, struct vclock *vclock, >>>           row.sync = sync; >>>           coio_write_xrow(&relay->io, &row); >>>   +        xrow_encode_raft(&row, &fiber()->gc, &raft_req); >>> +        row.sync = sync; >>> +        coio_write_xrow(&relay->io, &row); >> You might need to send it before the limbo checkpoint. Otherwise >> the problem is exactly the same - the master could send the limbo >> state, the replica applied it, then the master dies before sending the >> raft state, then the replica has limbo's term > raft term. > > > Yep, thanks for noticing! Fixed. Hm, but is it really possible? If the initial join is not finished (the master didn't send data) and only the limbo is delivered, then the remote instance is going to fail its bootstrap anyway and won't use the partially received state.