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 5CD0B6EC5F; Wed, 21 Apr 2021 08:58:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5CD0B6EC5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618984703; bh=b/tm2+wMUbGGTB7NlqYKpLzNkB2YlItrvaJu3v0uDoo=; 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=S5yxLxezlVGedQvs8Si3bL5fSIobmY/QKwCchvhM2BYRXbUskplBHpk5lfpnpAcKK LiH7q/w+LPmb3+M5/FfSHVwCucCyapiaH/x6qx32e/bQFiLErdTBjrm9aKoWB9U6TS Rd+DnSvcmq/aZg7LpBrW+nKbBTlizvMzzT2rFscA= 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 1B8B86EC5F for ; Wed, 21 Apr 2021 08:58:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1B8B86EC5F Received: by smtp16.mail.ru with esmtpa (envelope-from ) id 1lZ5sT-0003wj-5j; Wed, 21 Apr 2021 08:58:21 +0300 To: Vladislav Shpilevoy , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: <716a7e7c-0f4f-34bb-1d2e-f995f679d868@tarantool.org> Message-ID: <91783e9d-3875-d4f0-9e46-1a8549219ffa@tarantool.org> Date: Wed, 21 Apr 2021 08:58:20 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <716a7e7c-0f4f-34bb-1d2e-f995f679d868@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: ru X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480257C85EA0BB7A95D5E28B957962BB550182A05F538085040CEEB9F46291A39922FC7053256ED68B1D9FAD48E2D9BD016819F5781F76A6FA8 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F50D2638D9B46FE5EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637BE5AE4430FA51EC18638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2464D9F456C0B3739560DC5E851C1D51BC7C2BEF539CC105AD2E47CDBA5A96583C09775C1D3CA48CFED8438A78DFE0A9E117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE709B92020B71E24959FA2833FD35BB23DF004C90652538430302FCEF25BFAB3454AD6D5ED66289B5278DA827A17800CE772C7F6EAAB0B2D3AD32BA5DBAC0009BE395957E7521B51C20BC6067A898B09E4090A508E0FED6299176DF2183F8FC7C0722867CF954DE9D7CD04E86FAF290E2D7E9C4E3C761E06A71DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6753C3A5E0A5AB5B7089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A50ECDE4E018B2BFF95A4C16A04D67977EAB0933689511EB4AD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D345DB600F8E858000F9CE9C221816C7EA4D3184118615D88FF3A4C5CF8F5AC063D3BB0B00FE865535A1D7E09C32AA3244C5DA50C3C7C561BCCD6751C0FB5866AB61E098CBE561D6343FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojlPRl29Bx4WHPpm5ijnFsJg== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F8188F8219C33DDFD8A1AF2FFDC19EC1396E50100185C882B6424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 05/12] box: make clear_synchro_queue() write a PROMOTE entry instead of CONFIRM + ROLLBACK 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" 21.04.2021 01:30, Vladislav Shpilevoy пишет: > Thanks for the patch! > > Consider this commit on top of yours on the > branch sp/gh-5445-election-fixes-review: Thanks! Looks good, I squashed it. > > ==================== > [tosquash] Pass args explicitly to read_promote > > Firstly, to be consistent with the other read_*() functions. > Secondly, one of the next patches is going to change promote > lsn, and it should not change the original struct synchro_request > or copy it for a change. > > diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c > index 0d2d274f6..8668eb964 100644 > --- a/src/box/txn_limbo.c > +++ b/src/box/txn_limbo.c > @@ -487,13 +487,13 @@ txn_limbo_write_promote(struct txn_limbo *limbo, int64_t lsn, uint64_t term) > * rollback all entries > @a req.lsn. > */ > static void > -txn_limbo_read_promote(struct txn_limbo *limbo, > - const struct synchro_request *req) > +txn_limbo_read_promote(struct txn_limbo *limbo, uint32_t replica_id, > + int64_t lsn) > { > - txn_limbo_read_confirm(limbo, req->lsn); > - txn_limbo_read_rollback(limbo, req->lsn + 1); > + txn_limbo_read_confirm(limbo, lsn); > + txn_limbo_read_rollback(limbo, lsn + 1); > assert(txn_limbo_is_empty(&txn_limbo)); > - limbo->owner_id = req->origin_id; > + limbo->owner_id = replica_id; > limbo->confirmed_lsn = 0; > } > > @@ -660,7 +660,7 @@ txn_limbo_process(struct txn_limbo *limbo, const struct synchro_request *req) > txn_limbo_read_rollback(limbo, req->lsn); > break; > case IPROTO_PROMOTE: > - txn_limbo_read_promote(limbo, req); > + txn_limbo_read_promote(limbo, req->origin_id, req->lsn); > break; > default: > unreachable(); -- Serge Petrenko