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 4D5AF6B944; Tue, 13 Apr 2021 17:33:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4D5AF6B944 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618324398; bh=IgxJVA2rtVLh369Q/TCmtPn9Wol9fSesvw7gKF4D7sw=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=hc3VdEqn0WLVH8cP4AirqCBaYGgZuWFV2edr0yKa8MieOoOrZ+HTnwozC+yKaCDDQ 60xO5uai8mQ5ok/+B7f9optIR9m035Z0K9Sv0AqBZmljmZoACRGa+pkdbPeK3A/o/0 1ALRJXrG/APSEwk/JMvB0giXlao1tqr5mU09Izjk= Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id EA7406BD2D for ; Tue, 13 Apr 2021 17:33:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EA7406BD2D Received: by mail-lf1-f53.google.com with SMTP id b4so27686852lfi.6 for ; Tue, 13 Apr 2021 07:33:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zBYJ+Q1Y/ZlJJuK0wKLkei/toWZR9UXymCVf3j2X3tU=; b=m+SJipkj8XKCRoAiwaZhenLxiFgRs4ngNw71Cy2yFCmb8I/ZD11Ek3L+cIjnzSwQuO D5ny8HftAoneTn8hE4Y9EBy/CucnVn6mDcJpslPWvgI5+8P1UTOFEu0L2fDaSI1YgdQw eRR1VMqDZZM7U8KNvl9paSq4WyQ8Juo5YFT9HPDfl4EVDKbdQDY0aO+xqQngzVNOHYYN 8jhUy55aucjz9T5oxnoSH4E8U4QCtatEFJpjsJOcXzZykT+eN8jenlXP6CKQcgX+4TJu yrhJtGVpLI0BuRQ4FsCpnXn7kMIwKgkO28GeLO+H1ugXyplEsH7GW5wDcXa77fALoEkZ MZAQ== X-Gm-Message-State: AOAM531KWDp7hho/7xFP6vjYYsg2/R8ypbFS4pJsFZHkQ4CKGQl+Sl3P Czds6XDr+SvkaLdH7pzt7WOLjLSt3So= X-Google-Smtp-Source: ABdhPJwzCJIiK0GI5aqTOVAHa97QATWfBz3C8JULB1UFGjYf1+5jh3t0SKlyx4a4Gm/FkpT/CsHBYg== X-Received: by 2002:a19:f609:: with SMTP id x9mr16614804lfe.635.1618324396844; Tue, 13 Apr 2021 07:33:16 -0700 (PDT) Received: from grain.localdomain ([5.18.199.94]) by smtp.gmail.com with ESMTPSA id d15sm3064833lfs.277.2021.04.13.07.33.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 07:33:15 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id E9327560162; Tue, 13 Apr 2021 17:33:14 +0300 (MSK) Date: Tue, 13 Apr 2021 17:33:14 +0300 To: Serge Petrenko Cc: v.shpilevoy@tarantool.org, tarantool-patches@dev.tarantool.org Message-ID: References: <150875bcbaaa0b7c270c1d53dc623892312fe16d.1618256019.git.sergepetrenko@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <150875bcbaaa0b7c270c1d53dc623892312fe16d.1618256019.git.sergepetrenko@tarantool.org> User-Agent: Mutt/2.0.5 (2021-01-21) 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: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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.