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 140BA7030D; Mon, 13 Sep 2021 11:33:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 140BA7030D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1631522038; bh=5Duxnsajk6a9NYnfqj4xpBgy5W3vvRSvhiypPaWriL4=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=j8WllCza7iZx6WhYdhm78kSYpAmci8lKm7L8SpyoixZw7jB9GL/HWwjCf4tL7owxz upaK3gOHoBrR6rM65S97ucNR2W9sLdXI2G5Uo9FsHQsxGW39WSMKAr2c8UypwA+Jct CBZS31Kier2B7HpbclNznWCKd54ktbqcwl2T0gMA= Received: from smtp17.mail.ru (smtp17.mail.ru [94.100.176.154]) (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 7F3637030D for ; Mon, 13 Sep 2021 11:33:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7F3637030D Received: by smtp17.mail.ru with esmtpa (envelope-from ) id 1mPhPY-0001Dr-OF; Mon, 13 Sep 2021 11:33:57 +0300 To: Vladislav Shpilevoy , Cyrill Gorcunov , tml References: <20210910152910.607398-1-gorcunov@gmail.com> <20210910152910.607398-2-gorcunov@gmail.com> Message-ID: <0a7b5c6b-2a3b-7bbc-fbac-52d07286550e@tarantool.org> Date: Mon, 13 Sep 2021 11:33:55 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: ru X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD91AE02D33A9C88A2F5A5BD9D2085A59586CBBC9313A5A610100894C459B0CD1B95C765CC55925DE71BB20802AC934309E20092A193DB83BB179EDB787894F0DC7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE74D0D2DEF2EB846B0EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063795AFAF91F541EBCE8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D825B1C82C1C8D95AE9AA70B06FCEBD9C8117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC1F8789D36234D406A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FBDFBBEFFF4125B51D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EECCD848CCB6FE560C4DB3626BA78294CCD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3FA486DC37A503D0B6136E347CC761E07C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637FB177F6A8366F17BEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505761BD49625780BC1397A5A6289CE3CF6 X-C1DE0DAB: 0D63561A33F958A537F25209577A9C45161EF35063023DF3D8FFE2364902678CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3414C91BA6844B96CA6333284792785ADDD0DD1C06970B899C834CD0B5E9499BD8ADF9CD16C25109671D7E09C32AA3244C010CF5701AC016B013C9A1BEBA5AA95035DA7DC5AF9B58C0FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojEltUM+pNOWMeRVcmLNFIvg== X-Mailru-Sender: 583F1D7ACE8F49BD8518EAAA0E4F94F155E980C824B66BF1D9EBF58AF2DCB86F3EDE748897F45397424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v14 1/6] qsync: track confirmed lsn number on reads 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" 12.09.2021 18:44, Vladislav Shpilevoy via Tarantool-patches пишет: > Thanks for the patch! > > On 10.09.2021 17:29, Cyrill Gorcunov via Tarantool-patches wrote: >> We will use this lsn for requests validation >> in next patches for sake of split-brain detection. > I don't understand. How exactly will it help? Confirmed_lsn wasn't tracked during recovery and while following a master. So, essentially, only the living master could detect splitbrains by comparing confirmed_lsn to something else. > >> Part-of #6036 >> >> Signed-off-by: Cyrill Gorcunov >> --- >> src/box/txn_limbo.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c >> index 70447caaf..cca2ce493 100644 >> --- a/src/box/txn_limbo.c >> +++ b/src/box/txn_limbo.c >> @@ -437,6 +437,13 @@ txn_limbo_read_confirm(struct txn_limbo *limbo, int64_t lsn) >> assert(e->txn->signature >= 0); >> txn_complete_success(e->txn); >> } >> + >> + /* >> + * We use confirmed lsn number to verify requests and >> + * reject ones coming from split-brain cluster configurations, >> + * so update it even if there were no entries to process. >> + */ >> + limbo->confirmed_lsn = lsn; -- Serge Petrenko