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 014B46F3C7; Fri, 26 Mar 2021 23:50:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 014B46F3C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616791817; bh=1FMZHbe/jtU6rWy1nzZcthqf16n71ugnP04EbvRsqTc=; 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=AGyxUuZfETlVTxiG8Oa1s3gPOAS6qvy9wXY8BgA9CqmPTNIVApD4eHQu9vUMztZz2 fSjnfBEY7st5fXel+BKCjFZVvc5fKy4tSIHBZ4+WBWAokgfTCqNvEt55m6g5bdp+l6 PcVWo2EwlLNlKUwPKSqwYiMBJKUEaBPJOtdMVEcQ= Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (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 2F80D6F3C7 for ; Fri, 26 Mar 2021 23:50:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2F80D6F3C7 Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1lPtPH-0000BP-Ip; Fri, 26 Mar 2021 23:50:11 +0300 To: Serge Petrenko , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: Message-ID: <9bc5d0c0-39b1-eedd-9651-2f9c0b259f5a@tarantool.org> Date: Fri, 26 Mar 2021 21:50:10 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E32947427BE79D20CABD4F844F00D7AFD5C3C182A05F53808504026A3ACB128FF871795A1B5B81E531081A5F1691103009FE07718D9C86F96B1E3 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7B9115C1E69829868EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637A85D247F7B1E5F958638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C5DD32608FC869F5DD6217DE9BD3AF346CACF81D01C03BE3EA471835C12D1D9774AD6D5ED66289B5278DA827A17800CE767883B903EA3BAEA9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C390BCC82C2C62A6D1117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CF948C8A5E07526402BA3038C0950A5D36C8A9BA7A39EFB766EC990983EF5C0329BA3038C0950A5D36D5E8D9A59859A8B64274592ECF73844F76E601842F6C81A1F004C906525384307823802FF610243DF43C7A68FF6260569E8FC8737B5C2249B372FE9A2E580EFC725E5C173C3A84C3C9BE88FFEDFA497A35872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24A6D60772A99906F8E1CD14B953EB46D19F5855E57E04EB9355D89D7DBCDD132 X-C1DE0DAB: 0D63561A33F958A5602EA4B821879C1A556727ABC22E8EE12BC3843D2952D3E2D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D343536C6A4332D8B8A5EB16A2AA88704FE534F31572A43BBA6E09F07949CD134A98A71D15ABB587BC01D7E09C32AA3244C33A5CD1B584348E25EC6960E201D9BDD8894E9C85370243EFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojapPp7P/VpAhnTXKxb0UuDQ== X-Mailru-Sender: 504CC1E875BF3E7D9BC0E5172ADA3110515A4952A98FF17D98469F1225FDCD8E4AAA9FFB96F90F3207784C02288277CA03E0582D3806FB6A5317862B1921BA260ED6CFD6382C13A6112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 7/7] replication: do not ignore replica vclock on register 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! See 2 comments below. On 24.03.2021 13:24, Serge Petrenko wrote: > There was a bug in box_process_register. It decoded replica's vclock but > never used it when sending the registration stream. So the replica might > lose the data in range (replica_vclock, start_vclock). 1. Could you please add a test? > Follow-up #5566 > --- > src/box/box.cc | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) > > diff --git a/src/box/box.cc b/src/box/box.cc > index 292a54213..0bcb505a8 100644 > --- a/src/box/box.cc > +++ b/src/box/box.cc > @@ -2154,7 +2154,8 @@ box_process_register(struct ev_io *io, struct xrow_header *header) > "wal_mode = 'none'"); > } > > - struct gc_consumer *gc = gc_consumer_register(&replicaset.vclock, > + vclock_reset(&replica_vclock, 0, vclock_get(&replicaset.vclock, 0)); 2. xrow_decode_register_xc() already returns the vclock with empty 0 part. Why do you need this reset? > + struct gc_consumer *gc = gc_consumer_register(&replica_vclock, > "replica %s", tt_uuid_str(&instance_uuid)); > if (gc == NULL) > diag_raise();