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 837616EC55; Fri, 23 Jul 2021 10:45:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 837616EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627026312; bh=8iEDxYr250s7aKrAT/MYvReTsh680MS7Pu8nROeQrzA=; 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=sBDU+WY4OdU3bsxTG/azwS7ibb49HuCZTmYR4xNjKBl6ldVHfOF1lus06Bw9LfgNR WFDwyjILp689s0dFW2bil/l7JBWG3jU17q+fTpNySEYjOsgv/WvRoNn32BIvbiwwb6 Q2ZbEwNrxQuW5y49J+VyruwFsaXlRWT7MsnZ7QRI= Received: from smtp34.i.mail.ru (smtp34.i.mail.ru [94.100.177.94]) (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 2ECCC6EC55 for ; Fri, 23 Jul 2021 10:44:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2ECCC6EC55 Received: by smtp34.i.mail.ru with esmtpa (envelope-from ) id 1m6prW-0003lX-G6; Fri, 23 Jul 2021 10:44:50 +0300 To: Vladislav Shpilevoy , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: <571af10d-1ce6-8f92-b5c2-48eafa3d7977@tarantool.org> Message-ID: <502885e7-8400-248e-9bcc-fcfa443cbb22@tarantool.org> Date: Fri, 23 Jul 2021 09:44:49 +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: <571af10d-1ce6-8f92-b5c2-48eafa3d7977@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD941C43E597735A9C386C8E0DDEE7E2465E4A01A82547D9FE1182A05F538085040AB809D1CA9D430C401E12E371EA846DA54B7F46FD1CC8C5D01749B365CD890FF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7B114C2C2C20B7E62EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637BB680D3A894950458638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D86B9CF3CA543FCA37C9B27BFC31FFA963117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCC908CD1B87A134A2A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520140C956E756FBB7AE5D25F19253116ADD2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE7B96B19DC40933214AAC223A686B1DECD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE389DDFE3E282F3DD103F1AB874ED89028C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637FB177F6A8366F17BEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505242D48C77D4EE1ABADED1EFB62546FDB X-C1DE0DAB: 0D63561A33F958A53C8D1C19DE9E971F8003A95216C9B5A7C55791E776A156D3D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3447DF5779098ECEE9D62F0DD1E48FFBC7D17A5682DCB36A4C9AF3F3D36CA1677F4867B4917E15DB561D7E09C32AA3244CE8841C20C9A0D69210DC8F3CC5E9A91CCE0B41342B755BCDFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojtKXY6NTIXk0sqpOMMfIQ1A== X-Mailru-Sender: 9482C2B233321BD2827D960CA7C4D2E2DB1317534BE520C8163C37C5CCA39BB6BA08A835A0801BDE6BB2E709EA627F343C7DDD459B58856F0E45BC603594F5A135B915D4279FF0579437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 06/16] replication: send latest effective promote in initial join 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: Sergey Petrenko via Tarantool-patches Reply-To: Sergey Petrenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 22.07.2021 01:24, Vladislav Shpilevoy пишет: > Hi! Good job on the patch! > >> diff --git a/src/box/relay.cc b/src/box/relay.cc >> index 4ebe0fb06..4b102a777 100644 >> --- a/src/box/relay.cc >> +++ b/src/box/relay.cc >> @@ -442,7 +445,11 @@ relay_initial_join(int fd, uint64_t sync, struct vclock *vclock, >> row.type = IPROTO_JOIN_META; >> coio_write_xrow(&relay->io, &row); >> >> - /* Empty at the moment. */ >> + char body[XROW_SYNCHRO_BODY_LEN_MAX]; >> + xrow_encode_synchro(&row, body, &req); >> + row.replica_id = req.replica_id; >> + row.sync = sync; > Shouldn't we also attach sync to IPROTO_JOIN_SNAPSHOT and > IPROTO_JOIN_META? Although I don't see where it is used in > the applier. But I see it is attached to xrow_encode_vclock > a bit above. Yes, indeed. Will it be enough to set sync once only when sending the vclock? The field shouldn't be overwritten by anyone. =========================== diff --git a/src/box/relay.cc b/src/box/relay.cc index 4b102a777..db1d595e2 100644 --- a/src/box/relay.cc +++ b/src/box/relay.cc @@ -448,7 +448,6 @@ relay_initial_join(int fd, uint64_t sync, struct vclock *vclock,                 char body[XROW_SYNCHRO_BODY_LEN_MAX];                 xrow_encode_synchro(&row, body, &req);                 row.replica_id = req.replica_id; -               row.sync = sync;                 coio_write_xrow(&relay->io, &row);                 /* Mark the end of the metadata stream. */ ===========================