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 4051F6FC8F; Sun, 12 Sep 2021 18:44:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4051F6FC8F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1631461494; bh=a5HTq9AUFZaPRKgUYZ7bHYf2C1He33SFHoWKmtPZ/Nw=; 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=Mfx7/x3LrQiquGRTEdbaZDohb+OOVGGBJEwHdvgi/Vk8Hm3z7vQHEAs14gDC4yqJY EEUNrJgvmqovSPi8+9jqLJLjPAjkNycH7cj1wIDzCsEziqNFnlx8gbtXYAZUk+uxFc O92rVRiQROEPiU3+phmzjchBRLafGt2wXlnCQcG4= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (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 816F76FFA3 for ; Sun, 12 Sep 2021 18:44:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 816F76FFA3 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1mPReG-0005KA-V8; Sun, 12 Sep 2021 18:44:05 +0300 To: Cyrill Gorcunov , tml References: <20210910152910.607398-1-gorcunov@gmail.com> <20210910152910.607398-3-gorcunov@gmail.com> Message-ID: Date: Sun, 12 Sep 2021 17:44:04 +0200 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: <20210910152910.607398-3-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD91AE02D33A9C88A2F5A5BD9D2085A59586CBBC9313A5A610100894C459B0CD1B9FEFDCD18D8A897A0DD8BAC03ACC8AE0106C63B2D39B5180C333BECB3000124C7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE74AE62C7A8488879AEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063795AFAF91F541EBCE8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8BC9151612DF6EEE46F23F14A24826F17117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC566404C906FA8ADEA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520140C956E756FBB7AC26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6A1DCCEB63E2F10FB089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A58DDF754E7694590BD14D56FB6640B0A9D302861030086E38D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA756665624D6DDF07B5410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D343FB425EC7F4D4A4BEDC57FC352C51A8368F12773EC8A7D6708FF7940EEB8094008B6E088EFB97DD81D7E09C32AA3244CA5A4EC46B4A08B4853935B92CD126AF13C6EB905E3A8056BFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojuaewUBhMl4wAEZ4Xx+3n9w== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D61ECFC4AA13258B14254F6A6EC34AD083841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v14 2/6] qsync: update confirmed lsn on initial promote request 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 the patch! On 10.09.2021 17:29, Cyrill Gorcunov wrote: > When promote request is handled we drop last confirmed > lsn to zero because its value make sense for sync queue > owner only. Still the case where we become queue owner > for the first time is special - we need to fetch the > obtained lsn from the request and remember it so we > will be able to filter any next malformed requests > with wrong lsn numbers (see queue filtering procedure > in next patch). I don't understand anything. Why isn't it needed always? And how exactly will it help to filter stuff? > diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c > index cca2ce493..08463219d 100644 > --- a/src/box/txn_limbo.c > +++ b/src/box/txn_limbo.c > @@ -521,8 +522,13 @@ txn_limbo_read_promote(struct txn_limbo *limbo, uint32_t replica_id, > txn_limbo_read_rollback(limbo, lsn + 1); > assert(txn_limbo_is_empty(&txn_limbo)); > limbo->owner_id = replica_id; > + if (likely(limbo->has_initial_promote)) { > + limbo->confirmed_lsn = 0; > + } else { > + limbo->confirmed_lsn = lsn; > + limbo->has_initial_promote = true; > + } > box_update_ro_summary(); > - limbo->confirmed_lsn = 0; > }