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 D75096EC55; Mon, 6 Sep 2021 11:06:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D75096EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1630915597; bh=SHLW8NT/vIZJDyFhhaqMkf5u3EKWjzA3YWaspgZJKGk=; 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=wh54Jw8EceLsNNb+3essKWSVngi8ynWLlz2ExbG1YMN48A7t1Gp6D/y6CXE2xg9fd Eb6MPrszL3+v/jxEHDlIg4d0b49BSsVeou9KOWYKC8ZC5AHlTU3NSHqlA06T/G9rdI TJeVby6X03K4zdHx1kKzIc/L1V+V2kYo77w7CHgk= Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (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 DCFD76EC55 for ; Mon, 6 Sep 2021 11:06:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DCFD76EC55 Received: by smtp46.i.mail.ru with esmtpa (envelope-from ) id 1mN9eF-00020l-6A; Mon, 06 Sep 2021 11:06:35 +0300 To: Vladislav Shpilevoy , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: <7b374c0b4f05562ef0e1e65ea3270f3e9aa57f68.1630588778.git.sergepetrenko@tarantool.org> Message-ID: <4842897f-9df3-4588-9658-0e943c1869d2@tarantool.org> Date: Mon, 6 Sep 2021 11:06:34 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9D96C1EA41D18F4D5D354789DDBD713C098C562D0F83B1E74182A05F53808504030FA851AEAC33F222F9EC4FDD6ADBC253CED714F8557479C9BB9BE64029F5DDD X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78E8B8FAE95A2C418EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637CD1DFD3ABA64F6568638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8895DDFC8A85FFE30138E047EBEF6273F117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE599709FD55CB46A6CEDA8D6C8C3B0531D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3A7DFDF579AB090EF040F9FF01DFDA4A8C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006377F02F59195295693EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5CD45A044A34847C0312B864F0C44F2BF0BABE8A4F1AAD732D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA752546FE575EB473F1410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3480A9008907CB2FD08E62E4949D49DE465827A60334FC635B6B8442FB619840EF1D7DB6F25272AF701D7E09C32AA3244CB930A65916E25F11D1AEB210E9404184A90944CA99CF22E3FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj2BdsxQzaueWrvFSjwhHhdQ== X-Mailru-Sender: 583F1D7ACE8F49BD31DE23046B3A8460ABBE0D9ADF9DA565CE7541710038B28B8ADE62837DA509346BB2E709EA627F343C7DDD459B58856F0E45BC603594F5A135B915D4279FF0579437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 2/2] xrow: reset parameters of decode_subscribe() to default 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" 03.09.2021 00:47, Vladislav Shpilevoy пишет: > Hi! Thanks for the fixes! > > Now you can drop: > > applier.cc:1256: cluster_id = uuid_nil; > applier.cc:1292: vclock_create(&applier->remote_vclock_at_subscribe); > > box.cc:2617: instance_uuid = uuid_nil; > box.cc:2850: replica_uuid = uuid_nil; > box.cc:2851: peer_replicaset_uuid = uuid_nil; > box.cc:2854: vclock_create(&replica_clock); > > relay.cc:687: vclock_create(&relay->recv_vclock); Hi! Ok: diff --git a/src/box/applier.cc b/src/box/applier.cc index 9256078e1..b981bd436 100644 --- a/src/box/applier.cc +++ b/src/box/applier.cc @@ -1289,7 +1289,6 @@ applier_subscribe(struct applier *applier)           * the replica, and replica has to check whether           * its and master's cluster ids match.           */ - vclock_create(&applier->remote_vclock_at_subscribe);          xrow_decode_subscribe_response_xc(&row, &cluster_id,                      &applier->remote_vclock_at_subscribe);          applier->instance_id = row.replica_id; diff --git a/src/box/box.cc b/src/box/box.cc index 2c8113cbb..c5797fe58 100644 --- a/src/box/box.cc +++ b/src/box/box.cc @@ -2614,7 +2614,7 @@ box_process_register(struct ev_io *io, struct xrow_header *header)  {      assert(header->type == IPROTO_REGISTER); -    struct tt_uuid instance_uuid = uuid_nil; +    struct tt_uuid instance_uuid;      struct vclock replica_vclock;      xrow_decode_register_xc(header, &instance_uuid, &replica_vclock, NULL); @@ -2740,8 +2740,8 @@ box_process_join(struct ev_io *io, struct xrow_header *header)      assert(header->type == IPROTO_JOIN);      /* Decode JOIN request */ -    struct tt_uuid instance_uuid = uuid_nil; -    uint32_t replica_version_id = 0; +    struct tt_uuid instance_uuid; +    uint32_t replica_version_id;      xrow_decode_join_xc(header, &instance_uuid, &replica_version_id);      /* Check that bootstrap has been finished */ @@ -2847,11 +2847,10 @@ box_process_subscribe(struct ev_io *io, struct xrow_header *header)      if (!is_box_configured)          tnt_raise(ClientError, ER_LOADING); -    struct tt_uuid replica_uuid = uuid_nil; -    struct tt_uuid peer_replicaset_uuid = uuid_nil; +    struct tt_uuid replica_uuid; +    struct tt_uuid peer_replicaset_uuid;      struct vclock replica_clock;      uint32_t replica_version_id; -    vclock_create(&replica_clock);      bool anon;      uint32_t id_filter;      xrow_decode_subscribe_xc(header, &peer_replicaset_uuid, &replica_uuid, diff --git a/src/box/relay.cc b/src/box/relay.cc index 2947468ba..f5852df7b 100644 --- a/src/box/relay.cc +++ b/src/box/relay.cc @@ -683,8 +683,6 @@ relay_reader_f(va_list ap)              struct xrow_header xrow;              coio_read_xrow_timeout_xc(&io, &ibuf, &xrow,                      replication_disconnect_timeout()); -            /* vclock is followed while decoding, zeroing it. */ -            vclock_create(&relay->recv_vclock);              xrow_decode_vclock_xc(&xrow, &relay->recv_vclock);              /*               * Replica send us last replicated transaction -- Serge Petrenko