From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id F3FC8445320 for ; Sat, 11 Jul 2020 00:10:22 +0300 (MSK) Received: by mail-lf1-f66.google.com with SMTP id o4so3945482lfi.7 for ; Fri, 10 Jul 2020 14:10:22 -0700 (PDT) Date: Sat, 11 Jul 2020 00:10:20 +0300 From: Cyrill Gorcunov Message-ID: <20200710211020.GI1999@grain> References: <20200710075605.217824-1-gorcunov@gmail.com> <20200710075605.217824-4-gorcunov@gmail.com> <9c941738-75ce-3357-1bdb-6af6b95a4db6@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9c941738-75ce-3357-1bdb-6af6b95a4db6@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 3/5] qsync: txn_commit_async -- drop redundant variable List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tml On Fri, Jul 10, 2020 at 10:35:50PM +0200, Vladislav Shpilevoy wrote: > Опять же. Патч технически корректен, но так же и бесполезен. > Его полезность сравнима с исправлением опечатки в каком-нибудь > не особо нужном комменте. Сори, если токсично звучит. > > Но не вижу в этом патче нужды. We've to allocate a variable which we simply don't need. Look, the former code reads the flag, puts it into variable then immediately read it and that's all :/ I think we should not spread @is_sync but read the flag as much as possible for better grep'ability. Of course there are places where read-once variable is preferred but this is not our case.