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 614786B962; Wed, 14 Apr 2021 11:23:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 614786B962 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618388606; bh=WBq7u5VKhDPdvMzUNuvHj+wgKuzJ9dkO9tIMkOYfhPI=; 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=gEMr9W4ZcIqExXy5y2aiKLUlD6m4mVSjF9sIJVi2NNFhrwYnyvmxfdzvTbeRNso8D w/oBny1zyf/gIWuewuQN33aSI+NVJNWCO5zF8heMUaaIhgiAQEYH/Ph9iunq2JdwWQ J5ugwPWt8xzXX4FQZbf0hzsib3gQDblZN7Az9Ymg= Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (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 DFA466BD23 for ; Wed, 14 Apr 2021 11:23:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DFA466BD23 Received: by smtp59.i.mail.ru with esmtpa (envelope-from ) id 1lWao0-0003ct-7P; Wed, 14 Apr 2021 11:23:24 +0300 To: Cyrill Gorcunov Cc: v.shpilevoy@tarantool.org, tarantool-patches@dev.tarantool.org References: <150875bcbaaa0b7c270c1d53dc623892312fe16d.1618256019.git.sergepetrenko@tarantool.org> Message-ID: <86a5cfc2-ee8b-c781-472e-8a91bdf00246@tarantool.org> Date: Wed, 14 Apr 2021 11:23:23 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480257C85EA0BB7A95D0F00AE41BB9A5343182A05F53808504044511EADFE9A44320F419BA6F2F6BDE5D4BE7799C346B52CA84B8D1C334E2E7E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76C0A440987CA342DC2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE70186A8DAAA7CBDB1EA1F7E6F0F101C67CDEEF6D7F21E0D1D9295C2E9FA3191EE1B59CA4C82EFA6584B62072F8036A6D6DD4F136853E9BEE7F6B57BC7E64490618DEB871D839B73339E8FC8737B5C2249042F1592492B88C6CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0731955DFF79023228941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD26923F8577A6DFFEA7C49AF716F719AB83ED8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3632EDEA9CD5989A36136E347CC761E07C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BC7805D11922B9FF275ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A590C21FD71CE64BCB4EE56C03FE20CDAA62EE5E8B9754E849D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D2AC226BFD455724D0318C3C8ADB2E7DE1BB4E12D5F3D15FF397CDF726FB5DA5762FA988D2DB23D81D7E09C32AA3244CF4105D91391C95216A7DF6A80753A8CA51E887DA02A9F7BFFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojnA7/qPBUIXHg85SSLbsssg== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F87CEAF7ED092F529E965EF89AA9931342F6B451AA80350BC6424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 4/9] 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" 13.04.2021 17:33, Cyrill Gorcunov пишет: > On Mon, Apr 12, 2021 at 10:40:17PM +0300, Serge Petrenko wrote: >> } else { >> - txn_limbo_force_empty(&txn_limbo, wait_lsn); >> + /* >> + * Term parameter is unused now, We'll pass >> + * box_raft()->term there later. >> + */ >> + txn_limbo_write_promote(&txn_limbo, wait_lsn, 0); >> + struct synchro_request req = { >> + .type = 0, /* unused */ >> + .replica_id = 0, /* unused */ >> + .origin_id = instance_id, >> + .lsn = wait_lsn, >> + .term = 0, /* unused */ >> + }; > Is there some particular meaning of zeroifying designated assignments? > I mean why not simply > > struct synchro_request req = { > .origin_id = instance_id, > .lsn = wait_lsn, > }; > > or you wanted to pay attention that the left of the fields are > unused? Just curious, I'm fine with current code. I went for your option at first, and it's the one I'd prefer. But with it I got failed builds in some CI jobs. It said something like "sorry, not yet implemented: struct partial initialization" Maybe the error was there because I initialize not the first struct members. It's strange, because we use such "partial initializations" in some other places IIRC. Anyway, zeroifying unused fields explicitly helped. -- Serge Petrenko